-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Predictable artifact order #58
Predictable artifact order #58
Conversation
|
||
public Map<String, MavenArtifact> getDependencies() { | ||
return new HashMap<>(dependencies); | ||
this.dependencies = new TreeMap<>(dependencies); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment explaining why it needs to be a TreeMap?
Did I have any test in this repo?
I can't remember :)
LGTM but please add a comment so we don't lose out why it needs to be a TreeMap. Thank you for the contribution. |
@fzakaria Thanks for the review. I have added a comment and a unit test that shows that the artifacts are ordered alphabetically. The integration test Maven2nixIT also shows that the artifacts now appear in alphabetic order (see the modifications of the test's expected lockfile). |
LGTM -- I will spend some time Monday or this week to try and update the GitHub actions and validate it passes. |
FYI I fixed the Github-Actions on my fork (see https://github.com/jvierling/mvn2nix) by removing the |
Do you want to include the updated github action as part of the PR? |
I'll include the update to the Github Actions as part of the PR. However, I am not sure if removing |
Thank you for the great PR. |
On my system the integration test fails (at commit ea21cfe), because the order of the artifacts in the generated lockfile changes slightly. This pull request makes the order of the artifacts more predictable by ordering artifacts alphabetically. The pull request also includes some clean up commits.