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

Introduce --link-at-build-time flag for GraalVM 22.1 and later #24213

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

zakkak
Copy link
Contributor

@zakkak zakkak commented Mar 9, 2022

oracle/graal#4305 makes --allow-incomplete-classpath the default behavior (removing the flag) and introduces a new flag --link-at-build-time which enables us to set which classes/packages we require to be resolvable at build time. Passing --link-at-build-time without arguments to native-image requires all classes/packages to be resolvable at build time, essentially bringing the pre-22.1 behavior back.

oracle/graal#4305 makes
`--allow-incomplete-classpath` the default behavior (removing the flag)
and introduces a new flag `--link-at-build-time` which enables us to set
which classes/packages we require to be resolvable at build
time. Passing `--link-at-build-time` without arguments to `native-image`
requires all classes/packages to be resolvable at build time,
essentially bringing the pre-22.1 behavior back.
@zakkak zakkak requested review from Sanne and galderz March 9, 2022 18:48
@quarkus-bot quarkus-bot bot added the area/core label Mar 9, 2022
@zakkak zakkak changed the title Introduces --link-at-build-time flag for GraalVM 22.1 and later Introduce --link-at-build-time flag for GraalVM 22.1 and later Mar 9, 2022
Sanne
Sanne previously requested changes Mar 10, 2022
Copy link
Member

@Sanne Sanne left a comment

Choose a reason for hiding this comment

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

No please don't enable it "blanket": it will break some extensions, such as the oracle JDBC driver.

The global enablement flag needs to take into account exceptions; I suspect a new build item needs to be introduced to control the flag explicitly on each jar.

@zakkak
Copy link
Contributor Author

zakkak commented Mar 10, 2022

No please don't enable it "blanket": it will break some extensions, such as the oracle JDBC driver.

It is not enabled "blanket", it is disabled if any NativeImageAllowIncompleteClasspathBuildItems are present. Oracle JDBC has been tested and builds fine :)

The global enablement flag needs to take into account exceptions; I suspect a new build item needs to be introduced to control the flag explicitly on each jar.

That would be an optimization. This PR aims to reproduce the current behavior with 22.1 and later while also avoiding getting warnings.

@Sanne Sanne dismissed their stale review March 10, 2022 10:25

doubt answered

@Sanne
Copy link
Member

Sanne commented Mar 10, 2022

oh, missed that! sorry - my mind is elsewhere as I'm actually on PTO but this PR got my attention :)

Many thanks @zakkak :)

@Sanne Sanne merged commit c49f833 into quarkusio:main Mar 10, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Mar 10, 2022
@zakkak zakkak deleted the link-at-build-time-support branch March 10, 2022 12:10
@galderz
Copy link
Member

galderz commented Mar 14, 2022

Thx for the quick turnaround on this @zakkak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants