-
Notifications
You must be signed in to change notification settings - Fork 823
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
Line endings in Windows make the project can't be compiled #180
Comments
@enocom you worked on #92 - shouldn't this have prevented this from happening in the first place? (if I understand gitattributes correctly? @fooock How would/did you change .gitattributes to solve this issue? Do we need a
attribute added to the .gitiattributes file to force |
Currently, the content of the
Maybe we can add the next line to format using
|
Potentially silly question, if we make the change for |
I was hoping per this advice that Git would do the reasonable thing across all OS's. If we use
Does Make on Windows require |
On Windows we have users use WSL, so it should require \n. The weird thing is, it's WSL, and we all use Linux/Mac - and so if it works for us, I don't actually understand why it doesn't work for @fooock . Actually if I test for \r\n on the Makefile, I don't find at crlf endings. I am wondering if this is something on your end @fooock ? |
A thought - when you wrote:
Just wondering if that will shed some light on things. |
When I checkout the project using the Windows git executable, git automatically use the @markmandel I use Intellij + go plugin. I changed the line endings of all project files, and when done, the error disappeared When I made this change, git detect all project files as modified (the line endings). |
@fooock what happens if you run: Admittedly, when I was using WSL, I only ever use WSL (so I git in there as well). I wonder why windows is adding the crlf line ending on checkout? That is super weird. |
Using Windows console:
Global flag don't show nothing (to clarify). |
🤷♂️ I've no idea at this point. Somehow Git on windows adds crlf endings on checkout. Solution - don't use it? 😄 Also curious - when you changed the line endings within IntelliJ - which files were marked as changed in Git? All of them, or a specific set? |
I used the option from the |
Okay. I'm officially out of ideas. 😭 |
In theory, git should overlook the conversion from @fooock Would you be available for a video chat in the next few days? I'm thinking it would be good to see if we could solve this together, as Windows users are a big part of this project. |
As long as we are running all tasks within containers, the linux line ending should be fine. I suppose the tricky part is to configure one's IDE to refrain from changing the line endings to the Windows format. Does that make sense? Edit Should we just configure line endings to be CLRF by default since we're using containers everywhere? |
Looking at this some more, I see the problem. Presently, So when a Windows user checks out Agones, Git will convert all files to have a However, since we're building containers and using local files (like So, @fooock if you don't mind being a test user, I think the pragmatic and working solution (at least for now) is to add exclusions to
@markmandel WDYT? |
Related PR #182 |
Closed in #182 |
I executed the
make test
task using Windows 10 WLS. using themaster
branch. The expected result is a clean build, but I get:This is because Windows uses
\r\n
instead of\n
. If I change the line endings toLF
, the error is not shown.How can we change this behavior to make it OS agnostic? Maybe change the
.gitattributes
file?References
The text was updated successfully, but these errors were encountered: