-
Notifications
You must be signed in to change notification settings - Fork 59
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
Make sbt-github-actions work with Windows crlf line breaks #127
base: main
Are you sure you want to change the base?
Make sbt-github-actions work with Windows crlf line breaks #127
Conversation
bdbe2c4
to
79c8ae6
Compare
79c8ae6
to
8fa69df
Compare
Just to be cautious, Ill merge this when @armanbilge looks at it. |
2ab1442
to
5cac00c
Compare
So I just realized why my local Windows machine had failing tests for Due to this I have updated the PR so to make the git While some can say what are the merits of the PR since you can just set |
5cac00c
to
fab1103
Compare
fab1103
to
edd3783
Compare
@mdedetrich first of all, thanks for all your work investigating this :) I'm glad you were able to minimize the issue to the If I understand correctly, the changes here are not necessary for fixing CI, nor are they solving a user-reported issue. So personally I am cautious to make a change here, "just because". I am also hesitant to use non-default settings for the plugin itself. Dog-fooding is an important method of testing, since it is the only time we can actually "integration test" this plugin in GHA. If we disable this feature just for this plugin, we will no longer be checking that the
Would this mean that Windows users can commit regenerated workflows that are identical except for changes in line breaks? It seems like this would allow for noisy git histories. |
Yes although you could say that if a user is already regenerating a workflow then they are already committing said files at which point the noise is less of an issue. Unless a person actually triggers workflow generation with
I would disagree here but there is one main reason why, afaik there isn't a way to enforce
True, but also given my previous statement that |
On my Windows setup,
GenerativePluginSpec
/scripted tests are failing due to not handling Windows line breaks. This PR solves this by replacing Windows line breaks with Unix line breaks so that the rest of the logic worksResolves: #126
Note that arguably a better solution for this problem is to use
System.lineSeperator()
rather\n
, I tried to do this however its quite finicky and hence its also more risky but such an improvement can always be made in a future PR. Also as mentioned in the ticket this PR references the PR solves all of the issues on my Windows setup (i.e.sbt test scripted
passes completely) however the github actions CI is still failing for what I assume are orthogonal reasons (so to verify this PR you need to run it on a Windows machine see #125)