Skip to content
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

TonelWriter uses the platform line ending #99

Closed
gcotelli opened this issue Oct 19, 2021 · 3 comments
Closed

TonelWriter uses the platform line ending #99

gcotelli opened this issue Oct 19, 2021 · 3 comments

Comments

@gcotelli
Copy link
Contributor

TonelWriter uses the platform line ending convention when writing new lines. This is problematic for projects with contributors using different OS versions.
I have been bitted more than once with Pull Requests made from people using Windows because every little file looks like changed due to line endings.
I think it's better to settle into ONE line-ending convention for all the platforms. Any decent editor can read any of the line-ending formats so I don't see a problem here, and it will make project maintainers happier 😄 .
I propose to use the UNIX line-ending format given that is the native one in 2 of the 3 supported platforms.

@jecisc
Copy link
Contributor

jecisc commented Oct 20, 2021

I've been bitten by that too

@martinmcclure
Copy link

martinmcclure commented Oct 28, 2021

The decision to use platform-specific line endings was deliberate. If code is managed in Git, Git can (and should be configured to) adjust the line endings in the repository, so no changes are recorded in Git.

From the draft Tonel spec (comments welcome) https://github.com/GemTalk/TonelSpec/blob/master/TonelSpec1.0-draft1.txt

Line ending conventions
In all Tonel files, line ends must use the convention of the local operating system environment. This means CRLF for Windows, LF for Unix/Mac. It is recommended that users of Tonel configure their Git repositories to use LF line endings internally, and let Git handle the translation on the way in and out.

@estebanlm
Copy link
Contributor

indeed, as Martin says.
You can always configure git to avoid this problems. See https://github.com/pharo-project/pharo/blob/Pharo10/.gitattributes as an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants