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

Fix line-endings (only ws changes) #192

Merged
merged 1 commit into from
Sep 25, 2020
Merged

Conversation

cdunn2001
Copy link
Contributor

@cdunn2001 cdunn2001 commented Sep 24, 2020

No actual diffs. (git diff -w)

This PR is not a real change, so it can be merged immediately. That would help my rebasing for future PRs.

(If the repo has only \n line-endings, then people can get whatever they want by setting their .gitconfig properly.)

@cdunn2001
Copy link
Contributor Author

You can choose "Files changed", then click the gear drop-down, select "hide whitespace changes", and "Apply". There are no actual diffs here.

@cdunn2001
Copy link
Contributor Author

microsoft/WSL#184

@cdunn2001
Copy link
Contributor Author

With crlf endings, it's easy to get into a state on OSX where git status always says dirty, and it's surprisingly difficult to get out of that state. (I had to alter .gitattributes in a non-obvious way.)

@Araq
Copy link
Member

Araq commented Sep 25, 2020

Ok, but the downside is that we do not test CR-LF line endings anymore.

@Araq Araq merged commit 3b93801 into nim-lang:master Sep 25, 2020
@cdunn2001
Copy link
Contributor Author

The .gitattributes file definitely helps, since it will prevent existing files from regressing. I think we need * text=auto eof=lf though. I'll add that to a PR.

I could also add a test for line-endings.

I was thinking of switching from TravisCI to github CI, which I learned about recently from cblake's cligen Nim library. Interested? I was surprised to learn that forks actually run the same tests, which is both good and bad. It's good if the tests are fast and stable.

@cdunn2001 cdunn2001 deleted the fix-whitespace branch September 25, 2020 06:57
@Araq
Copy link
Member

Araq commented Sep 25, 2020

Github CI? Sure, bring it on please.

@cdunn2001
Copy link
Contributor Author

On second thought, it might be hard to beat the caching of TravisCI, though GitHub has some caching too.

c-blake used this: https://github.com/jiro4989/setup-nim-action/blob/v1/action.yml

which uses these javascripts: https://github.com/jiro4989/setup-nim-action/blob/v1/lib/

That looks unmaintainably complicated, so I'll punt. But jiro4989 did some really nice work here.

https://github.com/jiro4989/setup-nim-action

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

Successfully merging this pull request may close these issues.

2 participants