kinnay / NintendoClients

Python package to communicate with Switch, Wii U and 3DS servers
MIT License
558 stars 68 forks source link

Minor improvements #9

Closed mrexodia closed 5 years ago

kinnay commented 5 years ago

Oh, I accidentally removed the linux newline during the rewrite.

However, thinking about it again, I don't really see how it's better that way / what problem it solves. A python script is a text file, not a binary file, and all the other .py files that I create with a text editor have Windows line endings too on my computer.

mrexodia commented 5 years ago

For me the reason is git. Now if I rerun the generator the git diff will be annoying, so having it consistent is cleaner for me. Otherwise if someone contributes to a proto file on a Windows you get a huge diff.

kinnay commented 5 years ago

Doesn't git take care of that automatically? The files in this repo all have unix line endings as far as I can tell, even though they have windows line endings in my local repo. If someone generates the protocol files on windows it will convert the line endings to unix when the code is pushed. Similarly, during clone/pull they will be converted to whatever your OS uses.

mrexodia commented 5 years ago

Yes, git can do this. However I do not use this setting. Obviously I can also use dos2unix or similar tool to convert the line endings, but I think the intention is to have unix newlines and we control the code generation, so why depend on external factors?