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

Add native-source package type #15233

Merged
merged 1 commit into from
Feb 23, 2021
Merged

Add native-source package type #15233

merged 1 commit into from
Feb 23, 2021

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Feb 22, 2021

This package type is meant to support workflows where the actual native-image is created by a different
container than the one that run that Quarkus build.

Resolves: #15208

@geoand
Copy link
Contributor Author

geoand commented Feb 22, 2021

@jerboaa @ebaron here is the initial work for #15208.

What it does create the same directory that the native package creates, but doesn't actually run the native-image.
Furthermore, it also writes a file named native-image.args inside that directory which contains all the native-image args (that don't actually depend on the version of the native-image binary).
You can then run the actual native-image run by doing something like:

$GRAALVM_HOME/bin/native-image $(cat native-image.args)

The output directory for the is package type is stable, it's named native-sources and resides under target.

Please try it out with the workflow you have in mind and let me know.

@zakkak
Copy link
Contributor

zakkak commented Feb 22, 2021

LGTM, thanks @geoand

When merging please keep in mind that this PR conflicts with #14635 and #13963 .

@geoand
Copy link
Contributor Author

geoand commented Feb 22, 2021

I can wait for those to be merged if needed

@geoand
Copy link
Contributor Author

geoand commented Feb 22, 2021

#14635 was merged so I now need to rebase this onto the latest version of the code

@geoand geoand marked this pull request as ready for review February 22, 2021 16:44
@geoand
Copy link
Contributor Author

geoand commented Feb 22, 2021

PR has been rebased onto master and taken out of draft.

Please take a look :)

Thanks!

Copy link
Contributor

@zakkak zakkak left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @geoand

@geoand
Copy link
Contributor Author

geoand commented Feb 22, 2021

Thanks for the review @zakkak

@geoand
Copy link
Contributor Author

geoand commented Feb 22, 2021

@gsmet or @gastaldi mind taking a look at this as well?

Thanks

This package type is meant to support workflows where the actual native-image is created by a different
container than the one that run that Quarkus build.

Resolves: quarkusio#15208
Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

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

Nice! Loved it!

@geoand geoand added triage/waiting-for-ci Ready to merge when CI successfully finishes area/mandrel and removed area/maven labels Feb 22, 2021
@geoand geoand merged commit dfab7d9 into quarkusio:master Feb 23, 2021
@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Feb 23, 2021
@geoand geoand deleted the #15208 branch February 23, 2021 05:31
@stuartwdouglas
Copy link
Member

@geoand I missed this yesterday, but won't the native sources build not include the results of native image only build steps? If something is using onlyIf = NativeBuild.class they won't be included but should be?

@geoand
Copy link
Contributor Author

geoand commented Feb 24, 2021

That's a good question, should they actually be included?

We would probably have to look at each one

@geoand
Copy link
Contributor Author

geoand commented Feb 24, 2021

I'll go through them one by one and change the ones that need to be changed.

geoand added a commit to geoand/quarkus that referenced this pull request Feb 24, 2021
…tive

Furthermore, fail the build when native-sources is requested but the extension
creates its own output

Related to: quarkusio#15233 (comment)
@geoand
Copy link
Contributor Author

geoand commented Feb 24, 2021

Draft PR is here: #15291

I want it to run on my fork before I request a review

geoand added a commit to geoand/quarkus that referenced this pull request Feb 24, 2021
…tive

Furthermore, fail the build when native-sources is requested but the extension
creates its own output

Related to: quarkusio#15233 (comment)
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this pull request Sep 4, 2022
…ative

    Furthermore, fail the build when native-sources is requested but the extension
    creates its own output

    Related to: quarkusio/quarkus#15233 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core area/mandrel triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build native image source jar
5 participants