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

Build script switch to generate either shell xor binary for bin/enso #12014

Open
JaroslavTulach opened this issue Jan 7, 2025 · 0 comments
Open
Assignees
Labels
--low-performance -build-script Category: build script -compiler p-high Should be completed in the next sprint

Comments

@JaroslavTulach
Copy link
Member

The instant launching of Enso programs discussion describes needs for:

  • Change build script to not include shell based launchers (e.g. no enso.bat in release)
  • Include native image launcher (without -ea option) in the release

Development

  • Don't build native image launcher for developers by default, use shell based launchers
  • Allow building native image launcher at explicit request

All these requests have one in common:

  • the current behavior or buildEngineDistribution that generates shell launchers
  • followed by engine-runner/buildNativeImage that adds/overrides bin/enso or bin/enso.exe
  • is confusing, for example:
  • it is used in the CI and caused some cleanup mismatches (eliminated by now)
  • we need a switch to tell the build script whether to behave as of now or do only engine-runner/buildNativeImage

The Switch

An environment variable would be a good switch and would play well with the CI as the case of ENSO_JAVA shows. Let's thus introduceENSO_LAUNCHER which can have following values

  • native
  • debugnative
  • shell

based on these values it either executes the current copy of shell launchers or it skips this behavior and invokes engine-runner/buildNativeImage instead. The debugnative variant shall include -ea flag when invoking native-image - a mode needed for running Enso tests.

After the change it should be possible to:

enso$ ENSO_LAUNCHER=native sbt buildNativeImage
enso$ ls -l ./built-distribution/enso-engine-*/enso-*/bin/enso*

and see either only enso Unix executable or enso.exe on Windows.

Notes

  • the default value for ENSO_LAUNCHER remains shell for now - e.g. release behavior remains unchaged
  • change CI to use the ENSO_LAUNCHER=debugnative variable instead of invoking engine-runner/buildNativeImage directly
  • update documentation
@JaroslavTulach JaroslavTulach added p-high Should be completed in the next sprint -compiler --low-performance -build-script Category: build script labels Jan 7, 2025
@github-project-automation github-project-automation bot moved this to ❓New in Issues Board Jan 7, 2025
@JaroslavTulach JaroslavTulach moved this from ❓New to 📤 Backlog in Issues Board Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--low-performance -build-script Category: build script -compiler p-high Should be completed in the next sprint
Projects
Status: 📤 Backlog
Development

No branches or pull requests

2 participants