google / wuffs

Wrangling Untrusted File Formats Safely
Other
4.16k stars 131 forks source link

bang insert directives depend on linux line endings #100

Closed ratchetfreak closed 1 year ago

ratchetfreak commented 1 year ago

if on checkout git decides to convert the source files to windows line endings then attempting to generate fails with an error about it being an unrecognized line.

unrecognized line "// ¡ INSERT base/copyright\r\n", want one of:
    // ¡ INSERT InterfaceDeclarations.
    [...]
    // ¡ INSERT base/copyright
    [...]

even though "base/copyright" is present. And no information about where that line would be found or that it's about the line ending.

The workaround is to convert the various files with an insert directive in cgen/base back to linux line endings (or disable line ending conversion in git and recheckout) and run go install wuffs-c again

potential fixes