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

Remove JavaScript from bin/enso executable #12018

Open
JaroslavTulach opened this issue Jan 8, 2025 · 5 comments
Open

Remove JavaScript from bin/enso executable #12018

JaroslavTulach opened this issue Jan 8, 2025 · 5 comments
Assignees

Comments

@JaroslavTulach
Copy link
Member

This is the top ten of included packages after #11880 integrated:

Top 10 origins of code area:
  21.50MB js-language-24.0.0.jar
  15.69MB java.base
   6.75MB org.graalvm.truffle
   5.48MB jdk.internal.vm.compiler
   4.81MB java.xml
   4.15MB akka-http-core_2.13-10.2.10.jar
   4.14MB poi-5.2.3.jar
   3.87MB icu4j-24.0.0.jar
   3.34MB org.enso.languageserver.protocol.json

Originally posted by @JaroslavTulach in #11880 (comment)

@hubertp
Copy link
Collaborator

hubertp commented Jan 9, 2025

It's not really clear to me how we end up with including JS. Even after removing GraalVM.langsPkgs dependency I can still see it in the list. Weird...

@hubertp
Copy link
Collaborator

hubertp commented Jan 9, 2025

OK, so this one actually comes from ydoc-polyfill library and has been introduced a while ago.
Might be tricky to remove, since it is part of language-server dependency.

@JaroslavTulach
Copy link
Member Author

OK, so this one actually comes from ydoc-polyfill library and has been introduced a while ago. Might be tricky to remove, since it is part of language-server dependency.

I see. Up to you:

Only if you want to shorten the build times (by how much?) you'd work on removing Graal.js. Otherwise we can keep it in.

@hubertp
Copy link
Collaborator

hubertp commented Jan 9, 2025

Only if you want to shorten the build times (by how much?) you'd work on removing Graal.js. Otherwise we can keep it in.

By about 40-50secs on my machine. It varies. About 10% give or take.

@JaroslavTulach
Copy link
Member Author

By about 40-50secs on my machine.

That's a lot, when we multiply it by number of native image builds we will execute daily in this "getting it all working" period...

this one actually comes from ydoc-polyfill library

One more thought: ydoc-polyfill library:

  • needs Graal.js for execution
  • does not need Graal.js for compilation

Try to modify the dependencies that are coming from the ydoc-polyfill library to not bring Graal.js into native image build. That implies that in runtime any use of ydoc-polyfill should fail - but the only use is -Denso.dev.insight from #11822 as far as I know and it is only experimental and we can switch to JVM mode to use it. E.g. native image should be "buildable" without Graal.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔧 Implementation
Development

No branches or pull requests

2 participants