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

Closed
JaroslavTulach opened this issue Jan 7, 2025 · 4 comments · Fixed by #12035
Closed

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

JaroslavTulach opened this issue Jan 7, 2025 · 4 comments · Fixed by #12035
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
@enso-bot
Copy link

enso-bot bot commented Jan 13, 2025

Pavel Marek reports a new STANDUP for today (2025-01-13):

Progress: - Discussion about project-private types.

@enso-bot
Copy link

enso-bot bot commented Jan 14, 2025

Pavel Marek reports a new STANDUP for today (2025-01-14):

Progress: - DevX improvement to IR dumper: #12056

@enso-bot
Copy link

enso-bot bot commented Jan 15, 2025

Pavel Marek reports a new STANDUP for today (2025-01-15):

Progress: - Idea: Dump compiler IR graphs to IGV format - #12061 It should be finished by 2025-01-18.

@mergify mergify bot closed this as completed in #12035 Jan 16, 2025
@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Jan 16, 2025
@enso-bot
Copy link

enso-bot bot commented Jan 16, 2025

Pavel Marek reports a new STANDUP for today (2025-01-16):

Progress: - The PR merged.

  • PoC with dumping IR graphs to IGV is ready - we can dump all the lib modules, will demo that tomorrow.
    • Wil need a bit of a help with locations. It should be finished by 2025-01-18.

mergify bot pushed a commit that referenced this issue Jan 24, 2025
Fixes another issue related to #12014 - `runEngineDistribution` has to generate _native image_ launchers when in `ENSO_LAUNCHER=native` mode. This PR also introduces additional comma separated values to the `ENSO_LAUNCHER` variable:
- `shell` uses shell launchers and has no additional sub options
- `native` generates some form of _native image_ launchers
- concatenations are possible:
- `fast,native` disables code optimizations to speed the build up
- `test,native` enables assertions
- `debug,native` enables debug information
- combinations up to `native,test,debug,fast` are also possible
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: 🟢 Accepted
Development

Successfully merging a pull request may close this issue.

2 participants