-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
[truffle] shaded jars in jruby-truffle.jar #3587
Comments
Just clarifying the problem - even if you don't use Truffle, the fact that our jars come first on the classpath means they override anyone else trying to use their own version of those classes? |
Maybe a solution is to only put the Truffle jars on the class path when the launcher sees |
@chrisseaton yes those jars in the truffle jar just forces everyone to use those versions of the libraries. to add the truffle jar only on |
Or we could re-namespace everything, or just Antlr. I'll look into this options and update you here. |
yes, re-namespace antlr is good idea.
|
the snakeyaml is a different story as it implements psych and regular jruby uses the psych gem as default gem. truffle as it is right now does not allow to "overwrite" psych by installing the psych gem. not sure how much of it is a "temporary" solution to get yaml working. |
I'll do the only adding Truffle to the classpath when |
yes
|
Fixed in e84c5e6. I don't think we want to do any other shading or lazy loading at the moment, as the expected use-case for Truffle does not involve any user jars at the moment, so there's nothing to conflict with. |
with jruby-9k we do not shade jline:jline:jar:2.11 and org.yaml:snakeyaml:jar:1.14 anymore but the jars are packed as they are into the jruby-stdlib and required as jar via jar-dependencies. requiring jars means they go into the jruby-classloader which has the application classloader as parent. if the parent has already those jars loaded then the jruby-classloader will take the one from the parent.
without the jruby-truffle.jar it would be possible via jar-dependencies or jbundler to use org.yaml:snakeyaml:jar:1.15 or org.yaml:snakeyaml:jar:1.16 but with the jruby-truffle.jar this is NOT possible. same story for jline:jline:jar:2.11 and all the other jars which get embedded.
jruby-truffle.jar comes with rvm and rbenb and ideally jruby would come without any dependency so each jruby runtime can pick and use the jars its application needs (as each runtime has its own jruby-classloader).
The text was updated successfully, but these errors were encountered: