enso
enso copied to clipboard
Using `Channel` to load Java classes
Pull Request Description
- Provides an opt-in implementation to load classes via HotSpot JVM even when running in native image mode
- Use
--vm.D=polyglot.enso.classLoadingoption - more detail to turn the mode on - 53b24903e5cc69c9becd62a98c8a441e51619f95 creates new
jvm-channelmodule with less dependencies thanos-environmenthas- just a refactoring of code introduced by #13206
- f0cff3dc9572d01534e0efd66a004340d9c16b1f creates a unit test using
Channelin a single JVM - Use
Channelinjvm-interopproject to implementInteropLibrarymessages: 9c129de - connect
EnsoContextandjvm-interopin e41d046 - use the
jvm-interopto start HotSpot JVM and load a class if it is not in native image
Pros
- the system for interacting with HotSpot JVM is ready
- it can execute some Generic_JDBC_Tests
Pending Future Features
- logging in the HotSpot JVM isn't configured
- there is no GC support - what's allocated stays allocated
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
✨ GUI Checks Results
Summary
- 🧹 Prettier: ✅ Passed
- 🧰 GUI Checks: ❌ Failed
- 📚 Storybook: ❌ Failed
⚠️ Action Required: Please review the failed checks and fix them before merging.
See individual check results for more details.
With 4f373cd we can run some of the Generic_JDBC_Tests in the dual JVM mode:
$ ENSO_LAUNCHER=native,-ls,fast sbt
sbt:enso> runEngineDistribution --run test/Generic_JDBC_Tests
11 tests succeeded.
11 tests failed.
0 tests skipped.
0 groups skipped.
I've turned the whole infrastructure into an opt-in feature. I'd like to integrate now. Please review the PR.