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

Automatically register nested Kotlin classes for reflection #29033

Merged
merged 2 commits into from Nov 4, 2022

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Nov 3, 2022

Users have come to expect that @RegisterForReflection fixes
a lot of native image issues and use it a lot.
For Kotlin classes however, registering a class is often not
enough - the companion classes are need to be registered.
These companion classes are nested classes, so we automatically
set the property to true for Kotlin classes

Closes: #28167

Users have come to expect that @RegisterForReflection fixes
a lot of native image issues and use it a lot.
For Kotlin classes however, registering a class is often not
enough - the companion classes are need to be registered.
These companion classes are nested classes, so we automatically
set the property to true for Kotlin classes

Closes: quarkusio#28167
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 3, 2022

Failing Jobs - Building 6274863

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
✔️ JVM Tests - JDK 17
JVM Tests - JDK 17 MacOS M1 Set up runner ⚠️ Check → Logs Raw logs
✔️ JVM Tests - JDK 18

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

@gsmet gsmet merged commit e2fb4f4 into quarkusio:main Nov 4, 2022
@quarkus-bot quarkus-bot bot added this to the 2.15 - main milestone Nov 4, 2022
@gsmet
Copy link
Member

gsmet commented Nov 4, 2022

I think it's worth backporting it to 2.14.

@geoand
Copy link
Contributor Author

geoand commented Nov 4, 2022

Yeah, I agree

@geoand geoand deleted the #28167 branch November 4, 2022 10:46
@gsmet gsmet modified the milestones: 2.15 - main, 2.14.1.Final Nov 5, 2022
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.

Kotlin data class serialization fails with GraalVM >= 22.1
2 participants