-
Notifications
You must be signed in to change notification settings - Fork 323
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
Importing (some of) Standard.Base works from NI runner #9866
Conversation
…erge-dir=./engine/runner/src/main/resources/META-INF/native-image/org/enso/runner" enso --run test/Base_Tests/
Are you going to experiment with other standard libraries, like |
If this PR gets green, I'd like to integrated it as it improves the usability a lot. However I don't claim this is a fix for #9774. The work will continue. I still want to create a
Ideally, when we train the native image agent on
Now we have |
All's well including Factorial.enso invocation with regular NI runner, but... there is a failure of Factorial.enso invocation with Espresso built NI runner. Looks like our Espresso support in NI is broken. |
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.
Rejecting (for now) because I don't want this PR to accidentally get in with the wrong sbt definition.
…run without java.desktop
*/ | ||
package org.yaml.snakeyaml.introspector; | ||
|
||
// remove once https://github.com/snakeyaml/snakeyaml/pull/12 gets integrated |
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.
Remove this file once snakeyaml/snakeyaml#12 gets integrated.
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.
E.g. when upgrading to SnakeYaml 2.3 to be released in ~August. Tracked as
fac number | ||
main number=5 = | ||
v = fac number | ||
IO.println v |
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.
Using Standard.Base
library calls like IO.println
The important parts of this PR are green. Let's get ready for the integration.
We have experimentally demonstrated compiling |
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.
I don't like the changes in sbt. It very much doesn't feel like sbt'ish (not your fault) and adding some shell scripts into the project directory does not help things.
Also, what I'm missing in the source code comments (or build documentation) is the concrete command on how to generate all native image config files. I know that can be found somehow via NI documentation but I'd like to reduce friction points.
- ditch bash script in favour of platform agnostic solution - use proper dependencies between tasks to avoid dummy function calls
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.
I had a go at SBT and the changes are now in a more acceptable state. I know that the previous solution worked but the build setup easily starts to become a spaghetti monster when one starts to add random bash scripts.
@JaroslavTulach please add docs with an exact command on how to regenerate NI configs.
) | ||
} | ||
|
||
val exec = |
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.
Exec in Scala! Amazing, thank you @hubertp!
Thank you Hubert.
This commit contains the information 8cc1b2d |
To regenerated Substrate VM reflection metadata as this commit did, use: JAVA_OPTS="-agentlib:native-image-agent=config-merge-dir=./engine/runner/src/main/resources/META-INF/native-image/org/enso/runner" enso --run test/Base_Tests/ |
Pull Request Description
Standard.Base
is compiled intorunner
executable and canIO.println
fastenso --run test/Base_Tests
.json
files are part of this PRStandard.Base
library on-cp
when building theengine/runner/buildNativeImage
ENSO_JAVA=espresso ./runner
working again by avoidingjava.desktop
viajlink
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
Standard.Base
library