-
Notifications
You must be signed in to change notification settings - Fork 17
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
Jakarta inject API jar classes are not Java 8 byte code. #18
Comments
Could we get this updated in a 2.0.1 release of the API? |
@jhanders34 could you elaborate on the bug a bit? |
@pzygielo last year I attended a Jakarta 9 meeting and I asked about the statement that Java 8 would be the minimum level that would be supported. This was at the time when there was debate on whether the minimum Java level would be 8 or 11. At the time it was decided to be Java 8. The question I asked was whether with that decision would the byte code of the API jars also be Java 8 byte code. I was told yes that was what should be done. For some additional context, in the past Java / Jakarta EE API jars had a mix of different Java byte levels. Newer Java versions have optimizations depending on the byte code level of the classes that are loaded. Also as I said in the description the injection API jar is the odd API jar out; it is the only one that isn't using Java 8 byte code. A change to use Java 8 byte code would create consistency. I hope that helps give reason why I wrote this issue. |
@pzygielo Any additional thoughts on this? |
Classes that are usable on Java 8 is the minimum requirement, meaning that Java 9 or later are not supported. There was no requirement to have API jars compiled at the Java 8 level byte code, major.version=52. I'll update the pom to use Java 8 source and target levels. It will be a question to the spec committee as to whether this is a sufficient reason for a 2.0.1 service release. |
Just to note that this issue is resolved by commit - 749c66a |
Will there be a 2.0.1 version of the injection-api created? |
Yea I think we should do a 2.0.1 with recent changes (module-info.class). Not sure if there is any specific "bureaucracy" involved in producing a final release... but with recent changes to the release jobs, we should probably do an RC first anyway :-) |
This needs to be verified by running the injection TCK against weld before the release is pushed out. For service releases like this, there is no requirement for approval by the spec committee. |
OK cool. That said, I think the best way to test this with Weld would be to do an RC release :-) |
True, so I'll do that as I believe there has to be a release of the TCK to match any updates to the API jar as per the TCK process guide, but I have to look that up. An RC can be put out independently. |
We can discuss that on the call in 20 minutes, I'd be interested to know the requirements around a final release. |
It has been staged and released to maven central. It is available from staging repo here, central will be available soon: |
Awesome, thanks Scott. I note the tag "release notes" at https://github.com/eclipse-ee4j/injection-api/releases/tag/2.0.1.RC1 haven't been updated yet but maybe that happens at a later point. FYI: My tests all passing with 2.0.1.RC1 as expected and looks good. |
Releases on GitHub are not automatic, so I created it now. |
Describe the bug
The classes in the jakarta.inject api JAR have Java 5 byte code instead of Java 8 byte code.
To Reproduce
javap -v -classpath jakarta.inject-api-2.0.0.jar jakarta.inject.Inject | grep "major version"
major version: 49
javap -v -classpath jakarta.inject-api-2.0.0.jar jakarta.inject.Named | grep "major version"
major version: 49
javap -v -classpath jakarta.inject-api-2.0.0.jar jakarta.inject.Provider | grep "major version"
major version: 49
javap -v -classpath jakarta.inject-api-2.0.0.jar jakarta.inject.Qualifier | grep "major version"
major version: 49
javap -v -classpath jakarta.inject-api-2.0.0.jar jakarta.inject.Scope | grep "major version"
major version: 49
javap -v -classpath jakarta.inject-api-2.0.0.jar jakarta.inject.Singleton | grep "major version"
major version: 49
Expected behavior
Jakarta EE 9's minimum Java level is Java 8. As such all API jars should have Java 8 byte code. All other API JARs for the Jakarta EE 9 features have classes with Java 8 byte code. As you see above the major version is 49. It should be 52 for Java 8 byte code.
Additional context
From looking at other projects, the following needs to configured in the pom.xml
The text was updated successfully, but these errors were encountered: