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: build failing on Windows (#4484) #4504

Merged

Conversation

Barium
Copy link
Contributor

@Barium Barium commented Sep 27, 2024

What this PR changes/adds

Change path handling to correctly handle Windows path names.

Change line ending handling from using System.lineSeparator to using the regex \R to treat all unicode line ending character sequences as the line endings.

Change unit tests that compared certificates read from file, to ignore the line ending characters, so differences in line ending did not break the test.

Why it does that

The code failed during the unit tests when build on Windows, this change corrects the issues and enables the code to build. Generally checking for specific line endings (ie. System.lineSeperator) could be avoided and instead using the \R to match all unicode line endings will make the code more robust towards being built on different systems.

Linked Issue(s)

Closes #4484

Change path handling to correctly handle Windows pathnames.

Change line ending handling from using `System.lineSeparator` to using
the regex \R to treat all unicode line ending character sequences as the
line endings.

Change unit tests that compared certificates read from file, to ignore
the line ending characters, so differences in line ending did not break
the test.

Refs: eclipse-edc#4484
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

We are always happy to welcome new contributors ❤️ To make things easier for everyone, please make sure to follow our contribution guidelines, check if you have already signed the ECA, and relate this pull request to an existing issue or discussion.

Copy link
Contributor

@jimmarino jimmarino left a comment

Choose a reason for hiding this comment

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

Thanks for the conribution!

@jimmarino jimmarino added the bug Something isn't working label Sep 27, 2024
@Barium
Copy link
Contributor Author

Barium commented Sep 27, 2024

I can see that the PR failed a check since I must have forgotten to add the "Bug" label (thank you for adding it @jimmarino ), do I have to retrigger the checks somehow?

@paullatzelsperger
Copy link
Member

paullatzelsperger commented Sep 27, 2024

@Barium we need to fix something on our main branch - nothing you can do for now. We'll retrigger CI workflows as we need.

@paullatzelsperger paullatzelsperger merged commit 21f97ef into eclipse-edc:main Sep 27, 2024
25 of 26 checks passed
@Barium Barium deleted the fix/failing-windows-build branch September 27, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing build on Windows
3 participants