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

JlinkPlugin: restrict linking to platform modules #1248

Merged
merged 3 commits into from
Jul 12, 2019

Conversation

nigredo-tori
Copy link
Collaborator

@nigredo-tori nigredo-tori commented Jul 12, 2019

Closes #1247 .

This is a short-term solution to #1247, as outlined in #1247 (comment) (point 1). The long-term solution (JlinkPlugin refactoring/rewrite - #1247 (comment)) will be a separate issue.

  1. Fix jlink --module-path separator issue.
  2. Filter detected dependencies - only link the platform modules.
  3. Change jlinkModulePath to default to an empty list - we don't need it for platform modules.

Detecting platform modules has special cases - for historical reasons some Jakarta modules use java.* names, so we have to exclude them on a case by case basis. I'm not positive I got all of these - some seem to rely on automatic modules for their dependencies, and those are not properly supported by jlink/jdeps AFAICT... All in all, Jakarta's JPMS transition is a mess.

@nigredo-tori
Copy link
Collaborator Author

Test failure is due to this: #1246

@muuki88 muuki88 added the jlink label Jul 12, 2019
Copy link
Contributor

@muuki88 muuki88 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for all the helping comments, explanations and very concise test cases ❤️

@muuki88 muuki88 merged commit 663498c into sbt:master Jul 12, 2019
@nigredo-tori nigredo-tori deleted the 1247-jlink-module-path branch August 2, 2019 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JlinkPlugin: properly handle external modules
2 participants