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

module-info.class is not generated in a repeatable manner #5183

Closed
markt-asf opened this issue Mar 21, 2022 · 3 comments · Fixed by #5184
Closed

module-info.class is not generated in a repeatable manner #5183

markt-asf opened this issue Mar 21, 2022 · 3 comments · Fixed by #5184
Assignees
Milestone

Comments

@markt-asf
Copy link

Apache Tomcat uses bnd 6.2.0 to generate various data for the JARs produced by the build. Once of those is the module-info.class file.

Testing has shown that the the module-info.class file is not generated in a repeatable manner. I have observed differences in the ordering of the provided capabilities when building on different systems.

I think the issue is at line 456 of JPMSModuleInfoPlugin.java. groupingBy uses a HashMap by default. Changing that to a LinkedHashMap appears to fix this issue.

@bjhargrave bjhargrave self-assigned this Mar 21, 2022
@bjhargrave bjhargrave added this to the 6.3 milestone Mar 21, 2022
@bjhargrave
Copy link
Member

Thanks. PR to fix coming.

bjhargrave added a commit to bjhargrave/bnd that referenced this issue Mar 21, 2022
We use linked maps and sets and forEachOrdered on streams.

Fixes bndtools#5183

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
@markt-asf
Copy link
Author

Many thanks for the fix. As I suspected, the full fix was rather more complex than the one line patch I was using. I'll test with the latest snapshot and let you know the results.

@markt-asf
Copy link
Author

Sorry for the delayed reply. Everything looks good so far. I haven't seen any further reproducibility issues since switching to the 6.3.0 snapshot.

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 a pull request may close this issue.

2 participants