Manipulating classpath items should preserve item order#865
Merged
Conversation
Collaborator
|
Hey buddy ! |
Contributor
Author
|
hello stephane ! I'm on vacation too ! There is no hurry I will have to wait for a release before I put this in james build anyway :D enjoy your rest :D |
slandelle
requested changes
Aug 18, 2025
Contributor
Author
|
Sorry about that you are perfectly right. I changed the implementation to use a |
slandelle
requested changes
Aug 18, 2025
jeantil
commented
Aug 19, 2025
`getClasspathElements` computes the compilation and test compilation classpath from `MavenProject#getCompileClasspathElements` which is a `List<String>`. Transforming from the ordered `List<String>` into an unordered `Hashset<File>` can change the order of classpath elements. While this didn't cause a compilation issue in my case it could. It did break the [develocity cache key computation](https://develocity.apache.org/c/unuozmm6ecqpc/nusnauq3l6a6u/goal-inputs?expanded=WyJuemRibm96bGFrZ2FnLWNsYXNzcGF0aGVsZW1lbnRzIiwibnpkYm5vemxha2dhZy1jbGFzc3BhdGhFbGVtZW50cy0wLWZpbGUtb3JkZXIiXQ) I'm using to improve Apache James build times.
slandelle
approved these changes
Aug 19, 2025
Collaborator
|
Hey @jeantil 4.9.6 is out with your fix. Sorry for the delay. |
Contributor
Author
|
Thank you for letting me know ! the delay is perfectly normal :D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ScalaCompileMojo#getClasspathElementsandScalaTestCompileMojo#getClasspathElementscompute the compilation and test compilation classpath fromMavenProject#getCompileClasspathElementswhich is aList<String>.Transforming from the ordered
List<String>into an unorderedHashset<File>can change the order of classpath elements.In my specific case, it broke the develocity cache key computation I'm using to improve Apache James build times.
In other cases it could lead to incorrect compilation or compilation errors ..