-
-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Disable Git's autocrlf feature to fix Windows build failures #3881
chore: Disable Git's autocrlf feature to fix Windows build failures #3881
Conversation
Apparently, this wasn't the entire solution, but there are significantly fewer test failures now than before (down to ~20 from ~60). Notably, none of the sniper printer tests fail now! |
Suddenly Travis checks have started running again. @monperrus did they get back to you about the free project thing? GHA is working very well for us, so I don't see much value in putting in the effort of going back to Travis at the moment. Anyway, ignore failures on Travis for the moment. |
Yes, quoting their answer coming 4 months after our request (sig):
|
Agree. |
GHA currently having trouble, we'll have to just wait a bit: https://www.githubstatus.com/incidents/cj7gzzj30411 |
neat! |
Now ready for review again. Fixes most of the Windows build errors. The remaining failures are also mostly problems with line endings, but are probably due to incorrect usage. For example, if we pretty-print (non-sniper) an element, we should expect CRLF line endings on Windows. Fixing those is outside the scope of this PR. |
Thanks a lot @slarse |
Many of the build failures on Windows are due to
core.autocrlf
begin active in Git, which on that platform automatically converts the line endings in all files to CRLF on checkout and back to LF on check-in. This causes all tests with hard-coded LF line endings to fail.Why would we want hard-coded LF line endings in tests? Well, for example, in the sniper printer tests, we want to make sure that the sniper printer uses the line endings contained in the source file, regardless of platform. Thus, if there are LF line endings in the input, there should be LF line endings in the output, which simply cannot be tested if Git automatically converts these line endings.
This PR fixes 40 test failures on Windows, leaving 18 failures and 3 errors. Most of the remaining failures seem to be related to incorrect use of hard-coded line endings.