Open ADegele opened 6 years ago
Thank you for notifying. In theory generated files should not be in Git, but I guess it may depend on your use case. I guess that the best way deal with this issue would be to force the line endings style with a transpiler option... Or simply to force Unix style all the time :)
Well, we had a lengthy discussion in the team whether we should check in generated files. We decided for it, because it makes changes in the generators visible. Apart from that, it is easier in our multi-step build. I think the best way would be to have per default either system dependent or Unix style all the time, with a transpiler option to overwrite that behavior.
+1 for Unix style all the time
When generating TS files on windows, jsweet produces files with both Linux and Windows line endings. I've escaped the line endings in the following file:
The first and last line has Windows line endings, while the others have Linux line endings. On a Linux machine, all line endings are Linux, which causes whitespace diffs. We fixed it with postprocessing the files, since we have a special configuration for git, but you should be aware of it.