-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
See https://github.com/luontola/clojure-native-image-agent for an approach.
Benefit of the Java agent approach:
- single segment namespaces would be supported (which is an anti-pattern, but still).
- top-level instantiated Java classes would be also included in the config. One should always try to avoid this, so perhaps we should emit a warning if this happens, but it adds to the usability.
Downsides:
- Must run Java agent after AOT-ing Clojure (on uberjar or classpath) which is an extra step compared to what we have now.
Questions:
- Can we combine both approaches into one and run the Java agent during the native image build by shelling out to a different VM?
- Is there another way of detecting transitively instantiated classes by e.g. inspecting bytecode?
- Why doesn't GraalVM support this out of the box?
- In practice the current basic approach is usually enough, so is it worth the extra complexity? Perhaps we should add an expert mode using a Java property that then invokes the agent.
@luontola Perhaps you're willing to team up?
Context: oracle/graal#3476 (reply in thread)
devurandom
Metadata
Metadata
Assignees
Labels
No labels