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

kotlin-dsl native compilation fails due to missing jline reflection configuration resource #6147

Closed
jamesnetherton opened this issue Jun 4, 2024 · 3 comments

Comments

@jamesnetherton
Copy link
Contributor

Bug description

Quarkus has upgraded Kotlin to 2.x and it results in a native compilation failure for the kotlin-dsl integration tests:

Error: Could not find reflection configuration resource "META-INF/native-image/org.jline/jline-terminal/reflection-config.json".
com.oracle.svm.core.util.UserError$UserException: Could not find reflection configuration resource "META-INF/native-image/org.jline/jline-terminal/reflection-config.json".

The problem comes from kotlin-compiler-embeddable. It shades jline and includes all of it's native-image.properties. However all of the config files referenced like reflection-config.json are missing. Hence compilation fails.

jar tvf ./target/camel-quarkus-integration-test-kotlin-dsl-3.12.0-SNAPSHOT-native-image-source-jar/lib/org.jetbrains.kotlin.kotlin-compiler-embeddable-2.0.0.jar | grep "META-INF/native-image/org.jline/"
   131 Fri Feb 01 00:00:00 GMT 1980 META-INF/native-image/org.jline/jline-terminal-jansi/native-image.properties
   131 Fri Feb 01 00:00:00 GMT 1980 META-INF/native-image/org.jline/jline-terminal-jna/native-image.properties
   131 Fri Feb 01 00:00:00 GMT 1980 META-INF/native-image/org.jline/jline-terminal-jni/native-image.properties
   131 Fri Feb 01 00:00:00 GMT 1980 META-INF/native-image/org.jline/jline-terminal/native-image.properties

We can work around it with ExcludeConfigBuildItem until there is a proper fix.

@jamesnetherton
Copy link
Contributor Author

Thinking about it some more, maybe ExcludeConfigBuildItem could be the permanent fix, given that the tests are passing fine without any of the jline native-image config being present.

jamesnetherton added a commit that referenced this issue Jun 4, 2024
github-actions bot pushed a commit that referenced this issue Jun 6, 2024
jamesnetherton added a commit that referenced this issue Jun 10, 2024
github-actions bot pushed a commit that referenced this issue Jun 11, 2024
@jamesnetherton
Copy link
Contributor Author

jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Jun 12, 2024
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Jun 12, 2024
jamesnetherton added a commit that referenced this issue Jun 12, 2024
@jamesnetherton jamesnetherton changed the title [quarkus-main] kotlin-dsl native compilation fails due to missing jline reflection configuration resource kotlin-dsl native compilation fails due to missing jline reflection configuration resource Jun 13, 2024
@jamesnetherton
Copy link
Contributor Author

Closing as kotlin-dsl will be removed in Camel 4.9.0.

@jamesnetherton jamesnetherton closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2024
@jamesnetherton jamesnetherton removed their assignment Sep 16, 2024
@github-actions github-actions bot added this to the No fix/wont't fix milestone Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant