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

JRuby Complete 1.7.16.1 does not move asm to other package #2219

Closed
hendriks73 opened this Issue Nov 19, 2014 · 9 comments

Comments

Projects
None yet
3 participants
@hendriks73
Copy link

hendriks73 commented Nov 19, 2014

Up to at least JRuby Complete 1.7.13 the asm classes were moved to a package that was not the original package (which is org.objectweb.asm). This prevented version clashes when used with other script engines like jython or even with older versions of Hibernate or com.intellij:forms_rt. In short: It allowed to use JRuby in an environment that also needs other versions of asm.

1.7.14 and 1.7.15 apparently were pretty unusable, declaring dependencies or missing files.

Now JRuby Complete 1.7.16.1 could work again, but unfortunately contains an original asm v4 library without renamed package. This leads to version clashes with asm 2.2.3, which is still used widely.

Please revert to renaming the package name of asm (and I guess other libraries—not sure what else is included that may clash) to something custom and only used in JRuby, so that the library is embeddable again in non-trivial systems.

Thanks!

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Nov 19, 2014

looks like all 1.7.14, 1.7.15, 1.7.16 and 1.7.16.1 have this regression :(

@mkristian mkristian added this to the JRuby 1.7.17 milestone Nov 19, 2014

@mkristian mkristian self-assigned this Nov 19, 2014

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Nov 19, 2014

@hendriks73 if your setup is OK with a more modular "jruby" you can use org.jruby:jruby-noasm:1.7.16.1 which declares all dependencies BUT not asm and includes the repackaged ASM classes packed

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Nov 19, 2014

let's see if I can get a test case for this . . .

@hendriks73

This comment has been minimized.

Copy link
Author

hendriks73 commented Nov 19, 2014

Thanks for the jruby-noasm hint - works for me (as I don't mind multiple jars).

@headius

This comment has been minimized.

Copy link
Member

headius commented Nov 19, 2014

Definitely need to fix the renaming.

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Nov 20, 2014

how can I trigger "ASM" to test the case with jruby running along side asm 2.2.3 ? the fix is there but a test case to avoid regression would nice.

@hendriks73

This comment has been minimized.

Copy link
Author

hendriks73 commented Nov 20, 2014

Can't you just make sure asm 2.2.3 is in the classpath and lookup the URLs /org/objectweb/asm/ClassWriter.class corresponds to via the classloader's getResources() method.
If you get multiple entries, that's bad..

Or the other way around: With only jruby-complete in the classpath, you shouldn't be able to load the class org.objectweb.asm.ClassWriter via Class.forName() at all.
To me this seems to be the saner approach.

@mkristian mkristian closed this in 2a9ccce Nov 20, 2014

mkristian added a commit that referenced this issue Nov 21, 2014

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Nov 21, 2014

testing now on missing org.objectweb.asm.ClassWriter in all distribution forms: jruby-noasm, jruby-dist, jruby-complete and jruby-jars.gem

thanx @hendriks73

@hendriks73

This comment has been minimized.

Copy link
Author

hendriks73 commented Nov 21, 2014

I'm impressed, how quickly you were able to fix this!
Thank you!

yousuketto added a commit to yousuketto/jruby that referenced this issue Nov 22, 2014

[build] use the jruby-core noasm dependency - fixes jruby#2219
it also excludes the asm and com.github.jnr:jnr-ffi from dependencies list
so the BND for packaging the osgi does not include those anymore

yousuketto added a commit to yousuketto/jruby that referenced this issue Nov 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.