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

Move baseline from Java 11 to Java 17 #37335

Merged
merged 4 commits into from
Nov 30, 2023
Merged

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Nov 27, 2023

Creating as draft as I want a full CI run in my fork and because things are still in discussion.

We will need to check that Ecosystem CI is ready for this too, and probably a few other things like Quickstarts CI.

@quarkus-bot quarkus-bot bot added area/amazon-lambda area/arc Issue related to ARC (dependency injection) area/cli Related to quarkus cli (not maven/gradle/etc.) area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/funqy area/gradle Gradle area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure area/jbang Issues related to when using jbang.dev with Quarkus area/kotlin area/kubernetes area/maven area/platform Issues related to definition and interaction with Quarkus Platform area/resteasy-reactive area/scala labels Nov 27, 2023
@quarkus-bot quarkus-bot bot added this to To do in Quarkus Documentation Nov 27, 2023
Copy link
Member Author

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aloubyansky I added two comments to your attention. There's something odd with the Maven plugins.

Comment on lines 37 to 39
<!-- Not sure exactly why but the Maven plugins need to be compiled with Java 11 -->
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.release>11</maven.compiler.release>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aloubyansky there's something odd here. If I remove these lines and default to the parent Java 17, I end up with the following error when running the tests (basically anything trying to use the plugin fails):

(I have the same problem with the quarkus-maven-plugin, will post the exact error message below)

[ERROR]   ExtensionDescriptorMojoTest.shouldExecuteSimplePomCleanly:73->makeMojo:250->AbstractMojoTestCase.lookupConfiguredMojo:461->PlexusTestCase.lookup:205 » ComponentLookup com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) No implementation for BootstrapWorkspaceProvider was bound.
  while locating ExtensionDescriptorMojo
  at ClassRealm[plexus.core, parent: null]
      \_ installed by: WireModule -> PlexusBindingModule
  while locating Mojo annotated with @Named("io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor")

1 error

======================
Full classname legend:
======================
BootstrapWorkspaceProvider: "io.quarkus.maven.BootstrapWorkspaceProvider"
ExtensionDescriptorMojo:    "io.quarkus.maven.ExtensionDescriptorMojo"
Mojo:                       "org.apache.maven.plugin.Mojo"
Named:                      "com.google.inject.name.Named"
PlexusBindingModule:        "org.eclipse.sisu.plexus.PlexusBindingModule"
WireModule:                 "org.eclipse.sisu.wire.WireModule"
========================
End of classname legend:
========================

Comment on lines 18 to 20
<!-- Not sure exactly why but the Maven plugins need to be compiled with Java 11 -->
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.release>11</maven.compiler.release>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aloubyansky If I drop these lines and default to the parent Java 17, I end up with the following error when anything tries to use this plugin:

[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:generate-code (default) on project quarkus-integration-test-grpc-descriptor-sets-parent: Execution default of goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:generate-code failed: Unable to load the mojo 'generate-code' (or one of its required components) from the plugin 'io.quarkus:quarkus-maven-plugin:999-SNAPSHOT': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) No implementation for QuarkusBootstrapProvider was bound.
[ERROR]   while locating GenerateCodeMojo
[ERROR]   at ClassRealm[plugin>io.quarkus:quarkus-maven-plugin:999-SNAPSHOT, parent: ClassLoaders$AppClassLoader@251a69d7]
[ERROR]       \_ installed by: WireModule -> PlexusBindingModule
[ERROR]   while locating Mojo annotated with @Named("io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:generate-code")
[ERROR]
[ERROR] 1 error
[ERROR]
[ERROR] ======================
[ERROR] Full classname legend:
[ERROR] ======================
[ERROR] ClassLoaders$AppClassLoader: "jdk.internal.loader.ClassLoaders$AppClassLoader"
[ERROR] GenerateCodeMojo:            "io.quarkus.maven.GenerateCodeMojo"
[ERROR] Mojo:                        "org.apache.maven.plugin.Mojo"
[ERROR] Named:                       "com.google.inject.name.Named"
[ERROR] PlexusBindingModule:         "org.eclipse.sisu.plexus.PlexusBindingModule"
[ERROR] QuarkusBootstrapProvider:    "io.quarkus.maven.QuarkusBootstrapProvider"
[ERROR] WireModule:                  "org.eclipse.sisu.wire.WireModule"
[ERROR] ========================
[ERROR] End of classname legend:
[ERROR] ========================
[ERROR] 

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it work with maven.compiler.target=11?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it could but I'm very surprised we can't push Java 17 bytecode here.

Copy link

github-actions bot commented Nov 27, 2023

🙈 The PR is closed and the preview is expired.

@gsmet gsmet force-pushed the baseline-java-17 branch 3 times, most recently from 8085100 to 08a9944 Compare November 28, 2023 16:05
@gsmet gsmet force-pushed the baseline-java-17 branch 3 times, most recently from ee57b16 to f8ba043 Compare November 30, 2023 08:18
@gsmet gsmet marked this pull request as ready for review November 30, 2023 08:19
This was referenced Nov 30, 2023
zakkak added a commit to zakkak/mandrel that referenced this pull request Dec 4, 2023
Since quarkusio/quarkus#37335 Quarkus no longer
builds with JDK 11.
zakkak added a commit to graalvm/mandrel that referenced this pull request Dec 4, 2023
Since quarkusio/quarkus#37335 Quarkus no longer
builds with JDK 11.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/amazon-lambda area/arc Issue related to ARC (dependency injection) area/cli Related to quarkus cli (not maven/gradle/etc.) area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/funqy area/gradle Gradle area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure area/jbang Issues related to when using jbang.dev with Quarkus area/kotlin area/kubernetes area/maven area/platform Issues related to definition and interaction with Quarkus Platform area/resteasy-reactive area/scala area/testing release/noteworthy-feature
Development

Successfully merging this pull request may close these issues.

None yet

4 participants