enso/build
Pavel Marek 7d3a4aa76e --jvm tries to find Java executable system-wide. (#11500)
Fixes `--jvm` option, given to the native image. This was failing on my machine, because when given `--jvm` option, the runner was trying to find the `java` executable from the distribution manager's runtime (on my system located in `~/.local/share/enso/runtime`) and it used the first runtime found. But the first runtime on my system is JDK 17.

The `--jvm` option now tries to:
- Find a JDK from the distribution manager that has the same version as the JDK used for building the engine.
- If there is not an exact version match, it tries to find a runtime from distribution manager that is *newer*.
- If none, fallback to system-wide search
- System-wide search tries to find `java` from `$JAVA_HOME` and from `$PATH`. But this is just a fallback.

# Important Notes
- Added test to Engine CI jobs that pass `--jvm` argument to a native image of engine-runner
- ea3af5ffbc
- `runtime-version-manager` sbt project migrated to a JPMS module
- `engine-runner` now depends on `runtime-version-manager`.
- Removed unnecessary stuff in `runtime-version-manager` dealing with outdated `gu` Graal Updater utility.
- Extracted [GraalVersionManager](1455b025cb/lib/scala/runtime-version-manager/src/main/java/org/enso/runtimeversionmanager/components/GraalVersionManager.java) from [RuntimeVersionManager](d2e8994700/lib/scala/runtime-version-manager/src/main/scala/org/enso/runtimeversionmanager/components/RuntimeVersionManager.scala)
2024-11-21 18:57:07 +10:00
..
base Rust bump, reduce dependencices (#10803) 2024-08-13 23:16:55 +00:00
build --jvm tries to find Java executable system-wide. (#11500) 2024-11-21 18:57:07 +10:00
ci_utils Switch to newer MacOS GitHub runner (#11345) 2024-10-17 13:13:32 +00:00
ci-gen Split ydoc server into separate module (#10735) 2024-08-08 12:12:05 +00:00
cli Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
enso-formatter Rust bump, reduce dependencices (#10803) 2024-08-13 23:16:55 +00:00
install Rust bump, reduce dependencices (#10803) 2024-08-13 23:16:55 +00:00
macros/lib Rust bump, reduce dependencices (#10803) 2024-08-13 23:16:55 +00:00
.gitignore Build script merge (#3743) 2022-10-10 23:38:48 +02:00
README.md Build Script Post-Gui1 Cleanup (#9376) 2024-03-12 20:25:51 +01:00


Enso Language

[WIP] Enso CI Build Scripts

The code under this directory is under ongoing intensive development. As such it has not been reviewed or cleaned up yet.

General principles

  • Written in Rust.
  • Portable. Works on any platform that Enso targets.
  • Do not duplicate functionality that is already available in tools being part of our tech stack.
  • Supports both developers and CI use-cases (and environments). Developers can call it locally to do anything that CI does.
  • Does not require much setup work. Where feasible sets things up for the user.

Concepts

Target

  • Can be built locally from sources. Building yields artifacts.
  • Artifacts are self-contained to a single filesystem directory.
  • Artifacts can be downloaded from a remote location rather than built with the same effect.
  • Can contain other targets.
  • Artifacts can be platform-specific.
  • Artifacts must be releasable as CI run artifacts or release assets.

Usage

While the script is invoked using cargo run, the convenience run script is provided in the repository root.

The general usage form is:

./run <command> [options]

The command itself is usually a combination of target name and subcommand, like ide build or backend test.

At every layer, the --help command can be used to get more information. Note that the information depends on the command, so running ./run --help will not give you the same information as ./run ide --help nor ./run ide build --help.

Targets

IDE

IDE is the top level target for our project. It consists of GUI and Backend targets.

Sources consist mostly of TS code for the Electron client and packaging.

Artifacts are platform specific and consist of the single image file.

GUI

GUI is the front-end part of the project. It also packages WASM-compiled parser written in rust.

Artifacts are portable across the platforms and consist of the web page that can be served either using Electron client (as IDE does) or using a web server (like the Cloud version of Enso).

Backend

Backend is the back-end part of the project, as seen from the IDE perspective. It contains a Project Manager bundle that includes:

  • Project Manager native image;
  • Enso Engine distribution (with the Standard Library);
  • GraalVM distribution.

These components are not represented as "Targets" (in terms of build script) but could be and likely will be in the future.