-
Notifications
You must be signed in to change notification settings - Fork 5
Adapt to --strict-image-heap
being enabled by default
#35
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
Comments
I vote for that one |
@borkdude and I chatted. I shared that the
I will:
|
I experimented with digest by using its (now deprecated) single-segement Setup
Sanity test using JVM
Resulted in, as expected:
Initial RunFrom project root:
Yielded With init at build time for digest$digestEdited From project root:
This run shows probably more of what @borkdude experienced. ConclusionSingle-segment namespaces cannot be handled easily by via So option 3, Stop testing single-segment namespaces, it is! |
I think I'll leave our single-segment warning message in, it could be a helpful hint as to why the build has failed. |
ci: test against current GraalVM latest only, currently v22.0.1 test: - drop single segment namespace testing from native-image testing, it will fail under GraalVM v22 due to strict image heap being enabled by default. - introduce single-segment-test project to validate that our warning is still emitted by our native-image feature (we don't compile this project with `native-image`) - factor out some test project build support to build-helper project to reduce the amount of copy/paste code. doc: mention GraalVM v22 and single segment namespaces Closes #35
ci: test against current GraalVM latest only, currently v22.0.1 test: - drop single segment namespace testing from native-image testing, it will fail under GraalVM v22 due to strict image heap being enabled by default. - introduce single-segment-test project to validate that our warning is still emitted by our native-image feature (we don't compile this project with `native-image`) - factor out some test project build support to build-helper project to reduce the amount of copy/paste code. doc: mention GraalVM v22 and single segment namespaces Closes #35
A developer will should no longer see the warning about a single segment namespace. See #35 for details. Also updated copyright year.
A developer will should no longer see the warning about a single segment namespace. See #35 for details. Also updated copyright year.
Single-segment namespaces are not recommended in Clojure because they translate to the default java package. This can cause issues with Java interop and with GraalVM compilation (details clj-easy/graal-build-time#35) This particular dependency has deprecated the single-segment namespace. https://github.com/clj-commons/primitive-math/blob/a4ce3cb3effbffd2039880a3ed905af60b5cf153/src/primitive_math.clj#L4 This commit proposes to use the newer, non-single-segment namespace
Single-segment namespaces are not recommended in Clojure because they translate to the default java package. This can cause issues with Java interop and with GraalVM compilation (details clj-easy/graal-build-time#35) This particular dependency has deprecated the single-segment namespace. https://github.com/clj-commons/primitive-math/blob/a4ce3cb3effbffd2039880a3ed905af60b5cf153/src/primitive_math.clj#L4 This commit proposes to use the newer, non-single-segment namespace
Single-segment namespaces are not recommended in Clojure because they translate to the default java package. This can cause issues with Java interop and with GraalVM compilation (details clj-easy/graal-build-time#35) This particular dependency has deprecated the single-segment namespace. https://github.com/clj-commons/primitive-math/blob/a4ce3cb3effbffd2039880a3ed905af60b5cf153/src/primitive_math.clj#L4 This commit proposes to use the newer, non-single-segment namespace
Starting with GraalVM 22,
--strict-image-heap
is enabled by default.Here's the error we now get if I run
bb native-image-test
using GraalVM 22.0.1:Congrats to the Graal team for the comprehensive error message!
So what's happening is that we skip registering the single-segment namespace for build-time initialization because it has no package, but with
--strict-image-heap
now enabled by default, because the single-segment namespace is not initialized at build time, we get the error above.This breaks our native image test but seems like reasonable behaviour to me.
Options to fix our
native-image-test
:-H:-StrictImageHeap
option tonative-image
to disable strict image heap--initialize-at-build-time=single_segment_example$dummy
option tonative-image
native-image
to failI think I like option 2. It gives some hint to the dogged how they might actually init a single segment namespace while not encouraging turning off the now default strict image heap.
The text was updated successfully, but these errors were encountered: