Page MenuHomePhabricator

xhpast generation does not work properly under MinGW if the repo has CRLF line endings
Open, Needs TriagePublic


Building XHPAST on Windows doesn't work if the repository has CRLF line endings. This is because the code that pulls out the node names leaves CR on various constants.

Instead, either:

  • The make file should error if it detects a CR in any of the source files, so the user knows what the error is (because right now it spits out hundreds of unrelated C++ errors).
  • The make file / generate nodes script should strip CR after reading input files.

Event Timeline

hach-que assigned this task to epriestley.
hach-que raised the priority of this task from to Needs Triage.
hach-que updated the task description. (Show Details)
hach-que added a project: XHPAST.
hach-que added a subscriber: hach-que.

Another option is to add the following to .gitattributes:

*.php text eol=lf
*.cpp text eol=lf
*.hpp text eol=lf
*.y text eol=lf
*.l text eol=lf

to force the repository to always checkout those files with LF line endings, even on Windows.