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 windows build #25

Merged
merged 10 commits into from
Mar 8, 2022
Merged

Conversation

phanirithvij
Copy link
Contributor

closes #24

@phanirithvij
Copy link
Contributor Author

phanirithvij commented Mar 6, 2022

It happens because windows line feeds are CRLF \r\n and Linux, mac has LF \n.

  • Forcefully enabled LF for all files via .gitattributes, this fixed majority of the golden tests.
  • Issue Bug: full file paths in coverage output (windows) #24 occurs because go.mod files on windows could end with CRLF. Handled it.
    So, that method can be fixed by replacing \r\n with \n. But I did it using bufio.NewScanner. I will change it to use strings.ReplaceAll instead. Done

@orlangure
Copy link
Owner

Thank you @phanirithvij, this looks amazing!

I will take a deeper look as soon as I can, but for now can you elaborate on why do we need separate golden files for windows builds? Are their terminal sequences different or something like that?

I'll properly review it a little later. Thanks!

Copy link
Owner

@orlangure orlangure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again for taking care of this bug.

Everything looks great, but I think that one of the added files is redundant. Correct me if I'm wrong. I'll wait for your answer before releasing a new version.

@phanirithvij phanirithvij requested a review from orlangure March 8, 2022 00:04
@orlangure orlangure merged commit 02e40ff into orlangure:master Mar 8, 2022
@orlangure
Copy link
Owner

Thank you for fixing this!

@phanirithvij phanirithvij deleted the fix-windows-build branch March 8, 2022 13:16
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.

Bug: full file paths in coverage output (windows)
2 participants