Skip to content

Conversation

@mbien
Copy link
Member

@mbien mbien commented Sep 10, 2025

Migrates remaining modules of the java cluster from javac source to javac.release property and consolidate on one version.

  • moving away from the java 8 target unlocks JDK optimizations due to the invokedynamic bytecode instruction
  • the modules will now get for-removal deprecation warnings which helps with Codebase JDK compatibility #8256
  • release is also safer compared to source/target and we can use newer API / language features etc

Many core modules, including editor, maven, gradle were already using release 17, this migrates the rest.

module list in `java/*` which already used `release=17` (few used 11) before this change
debugger.jpda.truffle
debugger.jpda.ui
gradle.java
gradle.test
java.api.common
java.completion
java.disco
javadoc
java.editor.base
java.editor
java.file.launcher
java.hints
java.lexer
java.navigation
java.openjdk.project
java.source.base
java.source
java.sourceui
jshell.support
lib.jshell.agent
lib.nbjavac
maven.checkstyle
maven.embedder
maven.hints
maven.indexer
maven.indexer.ui
maven.junit
maven.junit.ui
maven
refactoring.java
spi.java.hints

exceptions/other minor changes:

  • skipped test data, performance module and non-trivial upgrades like java.hints.declarative, debugger.jpda.visual and form (Bump FormDesigner module to JDK 17 and adjust javac task #8387).
  • removed -Xlint:-options flag since target value 8 is obsolete and will be removed won't occur anymore
  • minor fixes, e.g one test needed updating and javac found one unused import of non-existing or accessible package

meta issue: #8813

@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) Gradle [ci] enable "build tools" tests LSP [ci] enable Language Server Protocol tests Maven [ci] enable "build tools" tests enterprise [ci] enable enterprise job ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) debugger tests JavaDoc [ci] enable java/javadoc tests and build-javadoc target and removed ci:all-tests [ci] enable all tests labels Sep 10, 2025
@mbien mbien marked this pull request as ready for review September 10, 2025 06:02
@mbien mbien added this to the NB28 milestone Sep 13, 2025
@ebarboni
Copy link
Contributor

LGTM.

@ebarboni ebarboni self-requested a review September 22, 2025 07:58
migrate remaining modules of the java cluster from javac source to
release flag and consolidate on one version

many core modules, including editor, maven, gradle were already using
release 17, this migrates the rest.

skipped test data, performance module and non trivial upgrades like
java.hints.declarative, debugger.jpda.visual and form.

removed -Xlint:-options flag since "target value 8 is obsolete and will
be removed" won't occur anymore

moving away from the java 8 target unlocks JDK optimizations due to
the invokedynamic bytecode instruction and javac deprecation warnings

release is also safer compared to source/target, we can use newer
API etc
@mbien
Copy link
Member Author

mbien commented Sep 22, 2025

going to refresh this PR for CI, give it another manual smoke test and merge after that.

@lahodaj
Copy link
Contributor

lahodaj commented Sep 22, 2025

I think this is good. I see java.lsp.server has been updated as well, I vaguely recall some problems with attempts to upgrade source level for that, but I don't recall details. As long as it builds and tests run, then its probably OK. And if there were some problems, we hopefully will be more motivated to fix them...

@mbien
Copy link
Member Author

mbien commented Sep 22, 2025

@lahodaj we could skip java.lsp.server if it reduces risk, there is no real need to do all at once - at least there is progress. Its also an area which I don't use that much, so if something breaks I might not notice it until release.

@lahodaj
Copy link
Contributor

lahodaj commented Sep 22, 2025

No, if build&test passes, just include even java.lsp.server. Staying on 8 is getting problematic there anyway.

@mbien
Copy link
Member Author

mbien commented Sep 22, 2025

all green (some of the usual flaky test cases needed a restart), manual smoke test was fine too

thanks for the reviews!

@mbien mbien merged commit f806b66 into apache:master Sep 22, 2025
134 of 138 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) debugger enterprise [ci] enable enterprise job Gradle [ci] enable "build tools" tests Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) JavaDoc [ci] enable java/javadoc tests and build-javadoc target LSP [ci] enable Language Server Protocol tests Maven [ci] enable "build tools" tests tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants