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

New release for Java 11? #1205

Closed
scottcarey opened this issue Sep 11, 2018 · 17 comments
Closed

New release for Java 11? #1205

scottcarey opened this issue Sep 11, 2018 · 17 comments

Comments

@scottcarey
Copy link

Java 11 is in RC and will be out in a couple weeks. The latest ASM is out and supports Java 11 bytecode already. Is a new release required?

@mtaivalj
Copy link

Definitely a new release Guice-4.2.1 is needed.
I can't run my code on Java 10 either without the newest ASM.
I use now 4.2.1-SNAPSHOT updated 2 days ago successfully.
Please release 4.2.1 ASAP, thanks!

@sameb
Copy link
Member

sameb commented Sep 20, 2018

FYI 4.2.1 is released with proper jdk10 support. it may be better for jdk11 too, but asm doesn't have a non-experimental way of supporting jdk11 yet, so i'll do another release for jdk11 once that's out.

@mtaivalj
Copy link

mtaivalj commented Sep 21, 2018

It's ok.
When will guice-4.2.1 be available in maven central?

@sameb
Copy link
Member

sameb commented Sep 21, 2018

It should be on maven central now.

@Loki-Afro
Copy link

@sameb it is, works for my case, thanks a lot.

@epkugelmass
Copy link

@sameb
Copy link
Member

sameb commented Sep 25, 2018

When asm releases a new version that non-experimentally supports JDK11, I'll include that and re-release. Feel free to ping here when ASM releases a new version, thanks.

@Loki-Afro
Copy link

Loki-Afro commented Sep 25, 2018

@sameb is there any asm issue at all? Can't find any one here https://gitlab.ow2.org/asm/asm/issues?scope=all&utf8=%E2%9C%93&state=opened

UPDATE, new versions would appear here:
https://asm.ow2.io/versions.html

@sameb
Copy link
Member

sameb commented Sep 25, 2018

no there is no bug in asm we're waiting on. we're just waiting on a release of ASM that supports JDK11 properly. asm reads bytecode, and jdk11 added new bytecode. the current version has an experimental JDK11 mode that can be enabled using ASM7_EXPERIMENTAL, but i don't want a proper release of guice to depend on experimental stuff. asm apparently releases builds that properly support the current JDK a few days after the JDK itself is released.

@cheister
Copy link

On JDK 11 with Guice 4.2.1 I was getting the exception

Caused by: java.lang.UnsupportedOperationException
	at com.google.inject.internal.asm.$ClassVisitor.visitNestMemberExperimental(ClassVisitor.java:248)
	at com.google.inject.internal.asm.$ClassReader.accept(ClassReader.java:651)
	at com.google.inject.internal.asm.$ClassReader.accept(ClassReader.java:391)
	at com.google.inject.internal.cglib.core.$DuplicatesPredicate.<init>(DuplicatesPredicate.java:93)
	at com.google.inject.internal.cglib.proxy.$Enhancer.getMethods(Enhancer.java:557)
	at com.google.inject.internal.cglib.proxy.$Enhancer.getMethods(Enhancer.java:535)
	at com.google.inject.internal.ProxyFactory.<init>(ProxyFactory.java:87)
	at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:82)
	at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
	at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)
	at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
	at com.google.inject.internal.FailableCache$1.load(FailableCache.java:40)

because of the ASM7_EXPERIMENTAL opcodes.

You can workaround this by passing

-Dcom.google.inject.internal.cglib.$experimental_asm7=true

to the jvm

@davido
Copy link

davido commented Sep 26, 2018

the current version has an experimental JDK11 mode that can be enabled using ASM7_EXPERIMENTAL, but i don't want a proper release of guice to depend on experimental stuff.

In this PR I did just that and released the artifacts here. With that custom Guice release Gerrit Code Review works as expected with Java 11: [1].

[1] https://gerrit-review.googlesource.com/c/gerrit/+/194040

@sameb
Copy link
Member

sameb commented Sep 26, 2018

Yup, I just don't want to make an official release using experimental stuff. Once asm puts out a release with a non experimental version, I'll use it.

@davido
Copy link

davido commented Sep 26, 2018

@sameb Thanks!

@ijuma
Copy link

ijuma commented Sep 29, 2018

See cglib/cglib#136

@mkurz
Copy link
Contributor

mkurz commented Oct 27, 2018

ASM 7 released!
https://mail.ow2.org/wws/arc/asm/2018-10/msg00008.html
http://central.maven.org/maven2/org/ow2/asm/asm/7.0/
Updated cglib pull request:
cglib/cglib#138

@sameb
Copy link
Member

sameb commented Oct 29, 2018

released guice 4.2.2 w/ new cglib & asm. may take a couple hours before it shows up on maven central.

@sameb sameb closed this as completed Oct 29, 2018
@mkurz
Copy link
Contributor

mkurz commented Oct 29, 2018

@sameb Thank you very much!

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

9 participants