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

Downstream native-image embedders are broken #907

Open
sgammon opened this issue Jan 26, 2025 · 0 comments · May be fixed by #914
Open

Downstream native-image embedders are broken #907

sgammon opened this issue Jan 26, 2025 · 0 comments · May be fixed by #914

Comments

@sgammon
Copy link
Contributor

sgammon commented Jan 26, 2025

// not required at runtime
exclude("org/pkl/cli/svm/**")

This exclusion drops key classes from the pkl-cli JAR which are needed to build Pkl native binaries. While the comment is correct, these classes are inert for JVM use at runtime, embedders will Have A Bad Time if these classes are excluded from a native-image classpath downstream, when using the pkl-cli-* JAR.

These classes can be dropped from fat JARs, because shading with Truffle is only supported on JVM anyway.

sgammon added a commit to elide-dev/pkl that referenced this issue Jan 28, 2025
- fix: don't exclude svm classes from `cli` jar

SVM (SubstrateVM) compile configuration classes
must be included within the `cli` jar to prevent
downstream `native-image` builds from failing.

- fix: include svm exclusions in fatjar config

Fat JARs cannot be used with `native-image`, so
these classes can still safely be excluded here.

Fixes and closes apple#907

Signed-off-by: Sam Gammon <[email protected]>
@sgammon sgammon linked a pull request Jan 28, 2025 that will close this issue
sgammon added a commit to elide-dev/pkl that referenced this issue Jan 28, 2025
- fix: don't exclude svm classes from `cli` jar

SVM (SubstrateVM) compile configuration classes
must be included within the `cli` jar to prevent
downstream `native-image` builds from failing.

- fix: include svm exclusions in fatjar config

Fat JARs cannot be used with `native-image`, so
these classes can still safely be excluded here.

Fixes and closes apple#907
Cherry-picked from apple#914

Signed-off-by: Sam Gammon <[email protected]>
sgammon added a commit to elide-dev/pkl that referenced this issue Jan 28, 2025
- fix: don't exclude svm classes from `cli` jar

SVM (SubstrateVM) compile configuration classes
must be included within the `cli` jar to prevent
downstream `native-image` builds from failing.

- fix: include svm exclusions in fatjar config

Fat JARs cannot be used with `native-image`, so
these classes can still safely be excluded here.

Fixes and closes apple#907
Cherry-picked from apple#914

Signed-off-by: Sam Gammon <[email protected]>
sgammon added a commit to elide-dev/pkl that referenced this issue Jan 28, 2025
- fix: don't exclude svm classes from `cli` jar

SVM (SubstrateVM) compile configuration classes
must be included within the `cli` jar to prevent
downstream `native-image` builds from failing.

- fix: include svm exclusions in fatjar config

Fat JARs cannot be used with `native-image`, so
these classes can still safely be excluded here.

Fixes and closes apple#907
Cherry-picked from apple#914

Signed-off-by: Sam Gammon <[email protected]>
sgammon added a commit to elide-dev/pkl that referenced this issue Jan 29, 2025
- fix: don't exclude svm classes from `cli` jar

SVM (SubstrateVM) compile configuration classes
must be included within the `cli` jar to prevent
downstream `native-image` builds from failing.

- fix: include svm exclusions in fatjar config

Fat JARs cannot be used with `native-image`, so
these classes can still safely be excluded here.

Fixes and closes apple#907
Cherry-picked from apple#914

Signed-off-by: Sam Gammon <[email protected]>
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 a pull request may close this issue.

1 participant