Use LF line endings for LKGs#7536
Conversation
|
You could consider adding |
|
👍 |
|
Why not use LF all the time? |
|
IIRC, our |
|
Also, mentioning that this fixes #6630. Assuming only LKG triggers turning off debug mode, this looks fine. |
|
Couple of good points here. There are generally 2 flows:
This changes addresses the first, @weswigham makes a good point and that would address the second. I'll update the @mhegazy Are you stating we should just use LF all the time (as in, for all files we build)? My concern there was I've seen many folks open/edit in historical tools such as Notepad for quick changes locally, which often don't handle LF line endings well. If we think this is a non-issue, I'm happy to make all build have LF line endings. As a broader topic - why do we remove all conversion on our source and check-in/out "as-is"? Why not just normalize all src files (i.e. are LF in the repo, but OS specific when checked out)? Thus |
|
We have to keep things as-is so that our test cases don't get normalized -- this would cause the potential for bugs to slip through where tests passed on one OS but not the other (say, if we broke ASI only in the case where it was LF-only) |
|
Ah, fair enough. Thanks @RyanCavanaugh (though we could still exclude just the FWIW: Making our |
|
If it's possible to make /tests/ be as-is and everything else be OS-specific, that'd be great. I don't think we knew about that option of .gitattributes when we set up the repo. |
|
already addressed by #9026 |
Building with LF line endings makes the
./libfolder (which we publish to NPM) a little over 200KB smaller than building with CRLF.As a useful aside, it also means if one person builds the LKG on a Windows machine, and the next person on a Mac/Unix machine, that the diff isn't the entire file contents (unless you suppress whitespace changes while diff'ing).