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

Introduce ENSO_LAUNCHER env var to configure behavior of buildEngineDistribution #12035

Merged
merged 15 commits into from
Jan 16, 2025

Conversation

Akirathan
Copy link
Member

@Akirathan Akirathan commented Jan 10, 2025

Closes #12014

Pull Request Description

Introduce ENSO_LAUNCHER env var that configures if and how the native image of engine-runner is built (More specifically, how sbt buildEngineDistribution command behaves):

  • native: NI is built optimized without assertions and without debugging symbols
  • debugnative: NI is built not-optimized with assertions enabled and with debugging symbols.
  • shell (the default value): NI is not built - buildEngineDistribution continues to behave as on develop.

Docs in native-image.md

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@Akirathan Akirathan added the CI: Clean build required CI runners will be cleaned before and after this PR is built. label Jan 10, 2025
@Akirathan Akirathan self-assigned this Jan 10, 2025
@Akirathan Akirathan changed the title Add some docs Introduce ENSO_LAUNCHER env var to configure behavior of buildEngineDistribution Jan 10, 2025
@Akirathan
Copy link
Member Author

Akirathan commented Jan 13, 2025

The Engine Checks CI job uses ENSO_LAUNCHER=debugnative (https://github.com/enso-org/enso/actions/runs/12747958886/job/35527132108?pr=12035#step:7:727), all the other jobs either set ENSO_LAUNVCHER=shell explicitly (like JVM Tests here), or don't set ENSO_LAUNCHER env var at all, which will fallback to shell.

I believe this PR is ready to be merged.

GitHub
Enso Analytics is a self-service data prep and analysis platform designed for data teams. - Introduce ENSO_LAUNCHER env var to configure behavior of buildEngineDistribution · fb9e94d

@Akirathan Akirathan marked this pull request as ready for review January 13, 2025 14:45
Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • please remove CHANGELOG entry - this is not end user visible change
  • I would avoid setting ENSO_LAUNCHER when default value is needed in the CI scripts

CHANGELOG.md Outdated Show resolved Hide resolved
build.sbt Outdated Show resolved Hide resolved
build/build/src/engine/context.rs Outdated Show resolved Hide resolved
build/build/src/engine/context.rs Outdated Show resolved Hide resolved
docs/infrastructure/native-image.md Outdated Show resolved Hide resolved
Akirathan and others added 2 commits January 14, 2025 11:57
@Akirathan Akirathan added the CI: No changelog needed Do not require a changelog entry for this PR. label Jan 14, 2025
@Akirathan Akirathan force-pushed the wip/akirathan/12014-ni-switch branch from d65aa9b to 318c786 Compare January 14, 2025 11:04
@enso-bot enso-bot bot mentioned this pull request Jan 15, 2025
project/NativeImage.scala Outdated Show resolved Hide resolved
Seq("--no-fallback", "--no-server") ++
Seq("-march=compatibility") ++
initializeAtBuildtimeOptions ++
initializeAtRuntimeOptions ++
buildMemoryLimitOptions ++
runtimeMemoryOptions ++
additionalOptions ++
additionalOpts.value ++
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

additionalOptions.. additionalOpts.. additionalFoo. This is getting confusing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit. One is a parameter to the method, and the other one is a value from the task. I don't know now how to merge these two, with minimal changes.

@JaroslavTulach
Copy link
Member

Looks like the CI is green:

It would be better to split/restructure the CI jobs in the future, but as far as I can say, things seem to work as they used to. Good job.

```bash
$ ENSO_LAUNCHER=native sbt buildEngineDistribution
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also check line 283:

Espresso support works also with
[native image support](#engine-runner-configuration). Just make sure
`ENSO_JAVA=espresso` is specified when building the `runner` executable:

```bash
enso$ rm ./built-distribution/enso-engine-*/enso-*/bin/enso
enso$ ENSO_JAVA=espresso sbt --java-home /graalvm
sbt> engine-runner/buildNativeImage

@Akirathan Akirathan added CI: Ready to merge This PR is eligible for automatic merge and removed CI: Clean build required CI runners will be cleaned before and after this PR is built. labels Jan 16, 2025
@mergify mergify bot merged commit ddda787 into develop Jan 16, 2025
50 of 51 checks passed
@mergify mergify bot deleted the wip/akirathan/12014-ni-switch branch January 16, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build script switch to generate either shell xor binary for bin/enso
3 participants