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
Closed

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

hendriks73 opened this issue Nov 19, 2014 · 9 comments
Assignees
Milestone

Comments

@hendriks73
Copy link

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
Copy link
Member

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
Copy link
Member

@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
Copy link
Member

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

@hendriks73
Copy link
Author

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

@headius
Copy link
Member

headius commented Nov 19, 2014

Definitely need to fix the renaming.

@mkristian
Copy link
Member

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
Copy link
Author

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 added a commit that referenced this issue Nov 21, 2014
@mkristian
Copy link
Member

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
Copy link
Author

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

yousuketto pushed a commit to yousuketto/jruby that referenced this issue Nov 22, 2014
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 pushed 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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants