Output text line separator setting.

Description

Guise Mummy uses the GlobalMentor HTML serializer which by default uses the system line ending to separate lines—CRLF for Windows or LF for Linux. Normally this is a good thing, especially when working with a source control system configured to automatically converts between the repository line ending and the system line ending.

However this does not make the build reproducible, which means that HTML pages generated on a Windows machine would be different than on a Linux machine. This could cause problems when updating a server, and it definitely will cause the SHA fingerprint value to differ. We could use some fancy algorithm to normalize line endings on files detected to be text files, and/or even piggyback on existing line ending configurations in e.g. .gitattributes. But the simpler and perhaps better approach would be to just make the line endings consistent for the build across platforms. (These are generated files in the target directory, anyway, and are thus somewhat ephemeral and probably won't be edited in an editor anyway. And besides most modern editors—even Notepad!—support LF line endings across platforms.)

Create a Guise Mummy setting mummy.textOutputLineSeparator to set the newline character for all generated text files (principally HTML pages), defaulting to LF (0x0A).

Note that in the future if we want to allow the configuration to indicate that the system newline should be used, i.e. how it works now, we'll probably wait until we have some sort of configuration references, so that some other e.g. env.systemNewline would be set by Guise Mummy and mummy.targetNewline could be set to reference it

Environment

None

Assignee

Garret Wilson

Reporter

Garret Wilson

Labels

None

Components

Fix versions

Priority

Critical
Configure