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

Support Spring Boot 3 native image build #1877

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

zhxnlai
Copy link
Contributor

@zhxnlai zhxnlai commented Sep 29, 2023

What was changed

Added the -parameters compiler argument for several classes, addressing the MissingParametersCompilerArgumentException during native image compilation in projects using Temporal.

Why?

This change is critical to enable users to compile their projects into native images without encountering MissingParametersCompilerArgumentException. It facilitates smoother and error-free native compilations, especially for projects relying on Temporal’s classes for constructor injection. By ensuring the parameter names are available at runtime via reflection, it mitigates runtime issues and enhances the user experience in native environments.

Checklist

  1. Closes
    Spring Boot 3 native image support #1840

  2. How was this tested:

The project was built and tested locally, and the MissingParametersCompilerArgumentException error was no longer present. Further testing in environments using native images is recommended.

  1. Any docs updates needed?

No documentation updates are needed as this change is related to the compilation process and does not alter any functionalities or features of the Temporal classes. The users consuming these classes do not require any additional steps or modifications in their usage or integration.

@zhxnlai zhxnlai requested a review from a team as a code owner September 29, 2023 18:09
@CLAassistant
Copy link

CLAassistant commented Sep 29, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -14,7 +14,7 @@ subprojects {

compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-Xlint:none' << '-Xlint:deprecation' << '-Werror'
options.compilerArgs << '-Xlint:none' << '-Xlint:deprecation' << '-Werror' << '-parameters'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add -parameters to the compileTestJava task as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing! done

@Quinn-With-Two-Ns
Copy link
Contributor

Thanks for the contribution @zhxnlai

@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit 3670bce into temporalio:master Oct 3, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants