-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[jsscripting] Use OSGi-ified GraalVM dependencies #18053
Conversation
9d54020
to
3629950
Compare
Signed-off-by: Florian Hotze <dev@florianhotze.com>
…endency Signed-off-by: Florian Hotze <dev@florianhotze.com>
3629950
to
2d43a6d
Compare
Signed-off-by: Florian Hotze <dev@florianhotze.com>
…ndency Signed-off-by: Florian Hotze <dev@florianhotze.com>
fcc3add
to
4098a58
Compare
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Question: is there a reason you didn't OSGi-ify the polyglot dependency? That also seems like it's going to be shared with the pythonscripting add-on. |
Yeah, I didn’t do this because I couldn’t get if work and I think it might not be able to work at all. Both the Polyglot and the Truffle API dependencies use the Java ServiceLoader to load the available engines and languages, which depend on the actual language you use. OSGi-ifying those two dependencies would require to be able to modify the service loading bevahiour of those two depending on the bundle requiring them. I googled a bit (I am no OSGi expert either) and everywhere it was recommended to build a fat JAR including those two deps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
@florian-h05 works for the pythonscripting binding too |
* [jsscripting] Use OSGI-ified org.graalvm.sdk:* dependencies Signed-off-by: Florian Hotze <dev@florianhotze.com>
Fixes #18054 by using a OSGi-ified Truffle Runtime, which is loaded only once.
It also reduces the add-on size from 34 MB to 16 MB: Truffle ICU4j was pretty big and now is provided as OSGi bundle and hence not bundled with the add-on anymore.
GraalVM Polyglot and Truffle API dependencies cannot be provided as OSGi bundles, because those use the Java ServiceLoader to load the available polyglot and truffle language implementations, which depend on on the individual add-on, and we cannot configure the service loading for those if they are shared OSGi bundles.