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

Use Multi-Release JAR instead of reflection for decompression #25158

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wendigo
Copy link
Contributor

@wendigo wendigo commented Feb 26, 2025

Since we've moved to JDK 11 we can now use multi-release JAR

Description

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Feb 26, 2025
@wendigo wendigo requested a review from losipiuk February 26, 2025 10:41
@github-actions github-actions bot added the jdbc Relates to Trino JDBC driver label Feb 26, 2025
@wendigo wendigo force-pushed the serafin/multi-release-jar branch 3 times, most recently from e91abbe to 2ddab37 Compare February 26, 2025 11:52
Copy link
Member

@losipiuk losipiuk left a comment

Choose a reason for hiding this comment

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

Not confident reviewing this.
How is the selection logic happeing now exactly?

@wendigo
Copy link
Contributor Author

wendigo commented Feb 26, 2025

@losipiuk if JDK is 22+ the java22/ sources will be used on top of the JDK 11 sources:

https://openjdk.org/jeps/238

@wendigo wendigo force-pushed the serafin/multi-release-jar branch 2 times, most recently from 1e663bc to 52a5b0b Compare February 26, 2025 12:43
Since we've moved to JDK 11 we can now use multi-release JAR
@wendigo wendigo force-pushed the serafin/multi-release-jar branch 2 times, most recently from 115c875 to 07d3008 Compare February 26, 2025 14:09
@martint
Copy link
Member

martint commented Feb 26, 2025

How does this interact with IntelliJ?

@wendigo
Copy link
Contributor Author

wendigo commented Feb 26, 2025

@martint badly but at least it's not breaking IntelliJ :)

@wendigo wendigo force-pushed the serafin/multi-release-jar branch from 07d3008 to d5779eb Compare February 26, 2025 14:30
Multi-Release JARs are causing error_prone/javadoc/surefire to use the latest compilation unit
while resolving dependencies for other modules.
@wendigo wendigo force-pushed the serafin/multi-release-jar branch from d5779eb to 518256b Compare February 27, 2025 13:49
@@ -82,7 +82,7 @@ jobs:
- name: Maven Checks
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
$MAVEN clean verify -B --strict-checksums -V -T 1C -DskipTests -P ci
$MAVEN clean install verify -B --strict-checksums -V -T 1C -DskipTests -P ci
Copy link
Member

Choose a reason for hiding this comment

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

verify is redundant now ..

Suggested change
$MAVEN clean install verify -B --strict-checksums -V -T 1C -DskipTests -P ci
$MAVEN clean install -B --strict-checksums -V -T 1C -DskipTests -P ci

@@ -197,7 +197,7 @@ jobs:
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
# Skip checks, these are run in `maven-checks` job and e.g. checkstyle is expensive.
$MAVEN ${MAVEN_TEST} -T 1C clean compile test-compile -DskipTests -Dair.check.skip-all=true ${MAVEN_GIB} -Dgib.buildUpstream=never -P errorprone-compiler \
$MAVEN ${MAVEN_TEST} -T 1C clean compile test-compile install -DskipTests -Dair.check.skip-all=true ${MAVEN_GIB} -Dgib.buildUpstream=never -P errorprone-compiler \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
$MAVEN ${MAVEN_TEST} -T 1C clean compile test-compile install -DskipTests -Dair.check.skip-all=true ${MAVEN_GIB} -Dgib.buildUpstream=never -P errorprone-compiler \
$MAVEN ${MAVEN_TEST} -T 1C clean install -DskipTests -Dair.check.skip-all=true ${MAVEN_GIB} -Dgib.buildUpstream=never -P errorprone-compiler \

Copy link
Member

@mosabua mosabua left a comment

Choose a reason for hiding this comment

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

Didnt look in more detail but we can definitely get rid of redundant lifecycle phase invocations

@@ -328,7 +328,7 @@ jobs:
- name: Maven Tests
id: tests
run: |
$MAVEN test ${MAVEN_TEST} -pl '
$MAVEN test install ${MAVEN_TEST} -pl '
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
$MAVEN test install ${MAVEN_TEST} -pl '
$MAVEN install ${MAVEN_TEST} -pl '

@martint
Copy link
Member

martint commented Mar 2, 2025

badly but at least it's not breaking IntelliJ :)

How so? Can you elaborate? If this doesn't work seamlessly with IntelliJ, then it's a non-starter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed jdbc Relates to Trino JDBC driver
Development

Successfully merging this pull request may close these issues.

4 participants