-
Notifications
You must be signed in to change notification settings - Fork 156
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 JDK9 plugin when using OSGi #1047
Conversation
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.
lgtm, and thank you. the code match the one in sbt-osgi, will let @mdedetrich take a look
Good news, I just fixed this via a simple filter. |
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.
Nice find I missed this part, I was trying to solve it another way.
This indeed seems to be correct location where the sbt-osgi workaround was historically done and I wasn't aware of it's existence. In general we need to look at how to solve this problem in a more sane way since the current implementation is really brittle, i.e. whenever sbt-osgi changes how something is packaged any other plugin which modifies the classpath in some way can also be inadvertently effected.
Pinging @eed3si9n since you asked before about this problem specifically incase you are still curious. There might be a case of re-thinking how to solve this problem in a more principled way, possibly for SBT 2.x.x?
@Roiocam @mdedetrich I think we can merge this first, any changes can come up after. and I can send a PR to test if the paradox fail with wrong java 9 related doc. |
I will defer to @Roiocam w/e he thinks is best. @Roiocam If you want us to merge the PR as is so you can make a new one just let me know. |
I have investigated the problem of protobuf-v3 for a while, and I don't think there is any problem with the existing methods. Since the 10a11,12
> [info] protobuf-v3 / Compile / dependencyClasspathAsJars
> [info] protobuf-v3 / osgiCacheBundle
13d14
< [info] protobuf-v3 / Compile / fullClasspath
20a22
> [info] protobuf-v3 / Compile / products |
Fair enough, I will go ahead and merge this PR and we can discuss this point later if needed. Thanks again for fixing this! |
Continue my digging: #1040 (comment)
And found a solution that can easily fix the JDK9 plugin, which changes the JDK9 product's inject place, the original inject place is
fullClasspath
, butsbt-osgi
doesn't use them anymore, so a simple change could fix our problem and without dependency upstream update.Compile result
Unzip Jar