ninja-build / ninja

a small build system with a focus on speed
https://ninja-build.org/
Apache License 2.0
10.79k stars 1.57k forks source link

Dependency parser treats valid filename characters as line-breaks #1542

Open MarcKamradt opened 5 years ago

MarcKamradt commented 5 years ago

I have some .dep files generated by custom tools that include filenames containing characters such as & or ' (don't ask why. musicians and visual artists get creative there, too).

These are valid filename characters but seem to be treated as line-breaks instead. I was able to resolve this issue by hacking the table in depfile_parser.cc to include those characters.

jlonnberg commented 5 years ago

I'm experiencing the same type of issues with additional characters, e.g., ' or [ as well as &. Is there a reason for triggering line-breaks for any printable characters apart from spaces and semicolons which are needed in the deps file? Looking at, for instance, clang we only escape spaces, # and $, which triggeres errors for paths containing strange characters.