Skip to content

Conversation

@Akirathan
Copy link
Member

@Akirathan Akirathan commented Jan 1, 2026

Closes #14469

Pull Request Description

Move Standard.Image out of the distribution, as an external library that will be hosted on GH as an artifact.

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 self-assigned this Jan 1, 2026
@Akirathan Akirathan added CI: No changelog needed Do not require a changelog entry for this PR. CI: Clean build required CI runners will be cleaned before and after this PR is built. labels Jan 1, 2026
@Akirathan
Copy link
Member Author

Akirathan commented Jan 5, 2026

First nightly release scheduled: https://github.com/enso-org/enso/actions/runs/20717064290

GitHub
Enso Analytics is a self-service data prep and analysis platform designed for data teams. - Nightly Release · 6850206

@Akirathan
Copy link
Member Author

Akirathan commented Jan 5, 2026

Choosing Standard.Image was not a good idea. It contains platform-specific native libraries in the polyglot/lib directory. Which means that there are 3 different versions of this library for three supported platforms. It is not yet clear how should this be supported in the library repository. The most straightforward solution now would be to merge all the native libraries into polyglot/lib directory, but that would require non-trivial changes to the sbt build configuration.

I realized this after the latest failure in the latest Upload backend job.

TL;DR

For the purpose of the demonstration, let's choose a library that has no native libraries.

Image library is going to be uploaded to an external repository, therefore, we need all the native libraries included.
@Akirathan
Copy link
Member Author

Akirathan commented Jan 6, 2026

After fd8bb2283b65032aa587ed18b726145cb0947d73, the contents of built-distribution/**/lib/Enso/Image is:
obrazek

This is needed because we don't yet have a way how to distinguish remote Enso.Image library based on the current platform.

@Akirathan
Copy link
Member Author

Akirathan commented Jan 6, 2026

Another iteration of Nightly Release workflow at https://github.com/enso-org/enso/actions/runs/20748715350

GitHub
Enso Analytics is a self-service data prep and analysis platform designed for data teams. - Nightly Release · 87721f4

@Akirathan
Copy link
Member Author

Akirathan commented Jan 12, 2026

Latest Nightly Release successfully uploaded std_image_lib.zip at https://github.com/enso-org/enso/actions/runs/20926487162. Link to the release with the correct asset: https://github.com/enso-org/enso/releases/tag/2026.1.1-nightly.2026.1.12.1

Inspecting release assets

std_image_repo.zip

Contents of unzipped std_image_repo.zip is a valid library repository:

Image
└── 2026.1.1-nightly.2026.1.12.1
    ├── THIRD-PARTY
    │   ├── NOTICE
    │   ├── licenses
    │   │   └── BSD-3-Clause
    │   └── org.openpnp.opencv-4.7.0-0
    │       └── NOTICES
    ├── docs
    │   └── api
    │       ├── Histogram.md
    │       ├── Image.md
    │       ├── Image_File_Format.md
    │       ├── Main.md
    │       ├── Matrix.md
    │       ├── Matrix_Error.md
    │       ├── Read_Flag.md
    │       └── Write_Flag.md
    ├── manifest.yaml
    ├── package.yaml
    ├── polyglot
    │   ├── java
    │   │   ├── opencv-wrapper-thin.jar
    │   │   └── std-image.jar
    │   └── lib
    │       ├── aarch64
    │       │   └── macos
    │       │       └── libopencv_java470.dylib
    │       └── amd64
    │           ├── linux
    │           │   └── libopencv_java470.so
    │           └── windows
    │               └── opencv_java470.dll
    └── src
        ├── Histogram.enso
        ├── Image.enso
        ├── Image_File_Format.enso
        ├── Image_Services.enso
        ├── Main.enso
        ├── Matrix.enso
        ├── Matrix_Error.enso
        ├── Read_Flag.enso
        └── Write_Flag.enso

16 directories, 27 files

Engine distribution

enso-engine-2026.1.1-nightly.2026.1.12.1-macos-aarch64.tar.gz:

Edition

The contents of the generated enso-2026.1.1-nightly.2026.1.12.1/editions/2026.1.1-nightly.2026.1.12.1.yaml edition file seems correct:

# This file was generated automatically by `project/Editions.scala`.
# Do not edit it directly.

# This file is a template and should not be used directly.
# Replace placeholders in double brackets with actual values.
#
# See [editions.md](https://github.com/enso-org/enso/blob/87ce78615afecb8bd8d586c798c97ab5e28083cd/docs/libraries/editions.md)
# for the description of its contents.
#
# === Library upload ===
# Some libraries may be uploaded during the (nightly) release.
# Such libraries need to have an associated repository with URL with `jar` scheme.
# See [sharing.md](https://github.com/enso-org/enso/blob/87ce78615afecb8bd8d586c798c97ab5e28083cd/docs/libraries/sharing.md)
#

engine-version: 2026.1.1-nightly.2026.1.12.1
repositories:
  - name: main
    url: 'https://libraries.release.enso.org/libraries'
  - name: std_image_repo.zip
    url: 'jar:https://github.com/enso-org/enso/releases/download/2026.1.1-nightly.2026.1.12.1/std_image_repo.zip'

libraries:
  - name: Standard.Base
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Test
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Table
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Database
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.AWS
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Geo
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Visualization
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Examples
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Searcher
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Generic_JDBC
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Google
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Google_Api
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Snowflake
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Microsoft
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Tableau
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Saas
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.DuckDB
    repository: main
    version: 2026.1.1-nightly.2026.1.12.1
  - name: Standard.Image
    repository: std_image_repo.zip
    version: 2026.1.1-nightly.2026.1.12.1

Testing

There is still lib/Standard/Image/** in the release. We need to ensure that it is removed during the release process. For now, let's test it by manually removing that directory and the executing simple project:

from Standard.Image import all

main =
    file = File.new "/Users/pavel/Downloads/wmf-logo.png"
    img = Image.read file
    img

NI mode

which is now failing with:

Exception in thread "main" org.graalvm.polyglot.PolyglotException: /Users/pavel/tmp/tmp.enso:3:1: error: Package containing the module Standard.Image.Main could not be loaded: The package download has failed: Accessing a URL protocol that was not enabled. The URL protocol jar is not tested and might not work as expected. It can be enabled by adding the --enable-url-protocols=jar option to the native-image command.
    3 | from Standard.Image import all
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	at <enso> tmp(Unknown)
	at org.graalvm.polyglot/org.graalvm.polyglot.Context.eval(Context.java:419)
	at org.enso.polyglot.api/org.enso.polyglot.PolyglotContext.evalModule(PolyglotContext.scala:32)
	at org.enso.runner/org.enso.runner.Main.runSingleFile(Main.java:967)
	at org.enso.runner/org.enso.runner.Main.handleRun(Main.java:865)
	at org.enso.runner/org.enso.runner.Main.mainEntry(Main.java:1224)
	at org.enso.runner/org.enso.runner.Main.lambda$handleLaunch$0(Main.java:1739)
	at org.enso.runner/org.enso.runner.Main.withProfiling(Main.java:1359)
	at org.enso.runner/org.enso.runner.Main.handleLaunch(Main.java:1735)
	at org.enso.runner/org.enso.runner.Main.launch(Main.java:1654)
	at org.enso.runner/org.enso.runner.Main.main(Main.java:1145)
	at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)

JVM mode

Running in --jvm mode fails as well:

...
[DEBUG] [2026-01-13T10:57:00+01:00] [org.enso.runner.Main] Execution failed with /Users/pavel/tmp/tmp.enso:3:1: error: Package containing the module Standard.Image.Main could not be loaded: The package download has failed: no !/ in spec
    3 | from Standard.Image import all
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The URL in the edition file is probably wrong. After adding the !/ suffix to the URL, there is a different failure:

[WARN] [2026-01-13T11:07:20+01:00] [org.enso.interpreter.runtime.DefaultPackageRepository] Resolution failed with [The package download has failed: Library [Standard.Image:2026.1.1-nightly.2026.1.12.1] was not found at [jar:https://github.com/enso-org/enso/releases/download/2026.1.1-nightly.2026.1.12.1/std_image_repo.zip!/Standard/Image/2026.1.1-nightly.2026.1.12.1/manifest.yaml].].
/Users/pavel/tmp/tmp.enso:3:1: error: Package containing the module Standard.Image.Main could not be loaded: The package download has failed: Library [Standard.Image:2026.1.1-nightly.2026.1.12.1] was not found at [jar:https://github.com/enso-org/enso/releases/download/2026.1.1-nightly.2026.1.12.1/std_image_repo.zip!/Standard/Image/2026.1.1-nightly.2026.1.12.1/manifest.yaml].

In other words, the zip file must also contain the namespace directory.

Summary

Local tests of the release revealed these issues:

  • NI config must include --enable-url-protocols=jar.
  • URL of the repo in edition file must end with !/.
  • The zip file must have Standard directory as the root, not Image.
  • The lib/Standard/Image/ directory must be deleted from the release

@Akirathan
Copy link
Member Author

When building NI with --enable-url-protocols=jar (done in 173fd74), HostClassLoader behaves differently; executing of simple

from Standard.Base import all
main = "foo".contains "f"

fails with:

Execution finished with an error: com.oracle.svm.core.jdk.UnsupportedFeatureError: Classes cannot be defined at runtime by default when using ahead-of-time Native Image compilation. Tried to define class 'org.enso.base.Text_Utils'
To make this work, you have the following options:
  1) Modify or reconfigure your application (or a third-party library) so that it does not generate classes at runtime or load them via non-built-in class loaders.
  2) If the classes must be generated, try to generate them at build time in a static initializer of a dedicated class. The generated java.lang.Class objects should be stored in static fields and the dedicated class initialized by passing '--initialize-at-build-time=<class_name>' as the build argument.
  3) If none of the above is applicable, use the tracing agent to run this application and collect predefined classes with 'java -agentlib:native-image-agent=config-output-dir=<config-dir>,experimental-class-define-support <application-arguments>'. Note that this is an experimental feature and that it does not guarantee success. Furthermore, the resulting classes can contain entries from the classpath that should be manually filtered out to reduce image size. The agent should be used only in cases where modifying the source of the project is not possible.

        at <java> org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:121)
        at <java> org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.RuntimeClassLoading.throwNoBytecodeClasses(RuntimeClassLoading.java:161)
        at <java> org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.RuntimeClassLoading.defineClass(RuntimeClassLoading.java:142)
        at <java> [email protected]/java.lang.ClassLoader.defineClass(ClassLoader.java:291)
        at <java> [email protected]/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:144)
        at <java> [email protected]/java.net.URLClassLoader.defineClass(URLClassLoader.java:454)
        at <java> [email protected]/java.net.URLClassLoader.findClass(URLClassLoader.java:367)
        at <java> org.enso.interpreter.epb.HostClassLoader.loadClass(HostClassLoader.java:88)
        at <java> org.enso.interpreter.epb.HostClassLoader.loadClass(HostClassLoader.java:60)
        at <java> org.enso.interpreter.epb.HostClassLoader.readMember(HostClassLoader.java:196)
        at <java> org.enso.interpreter.epb.HostClassLoaderGen$InteropLibraryExports$Uncached.readMember(HostClassLoaderGen.java:179)
        at <java> org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibraryGen$UncachedDispatch.readMember(InteropLibraryGen.java:7176)
        at <java> org.enso.interpreter.runtime.EnsoPolyglotJava.loadClass(EnsoPolyglotJava.java:320)
        at <java> org.enso.interpreter.runtime.EnsoPolyglotJava.lookupJavaClass(EnsoPolyglotJava.java:87)
        at <java> org.enso.interpreter.runtime.EnsoContext.lookupJavaClass(EnsoContext.java:621)
        at <java> org.enso.interpreter.runtime.IrToTruffle$BuildModuleScopeFromModule.$anonfun$processPolyglotJavaImport$1(IrToTruffle.scala:244)
        at <java> org.enso.interpreter.runtime.util.CachingSupplier.get(CachingSupplier.java:61)
        at <java> org.enso.interpreter.node.expression.constant.LazyObjectNode.executeGeneric(LazyObjectNode.java:38)
        at <java> org.enso.interpreter.node.callable.ApplicationNode.evaluateArguments(ApplicationNode.java:81)
        at <java> org.enso.interpreter.node.callable.ApplicationNode.executeGeneric(ApplicationNode.java:95)
        at <java> org.enso.interpreter.node.callable.function.BlockNode.executeGeneric(BlockNode.java:102)
        at <java> org.enso.interpreter.node.callable.function.BlockNode.executeGeneric(BlockNode.java:102)
        at <java> org.enso.interpreter.node.ClosureRootNode.execute(ClosureRootNode.java:91)
        at <enso> case_branch(Internal)
        at <enso> Text.contains(Extensions.enso:1190-1194)
        at <enso> tmp.main(tmp.enso:27:5-22)

Fixed by a workaround in 355bd3d. Note that officially, jar protocol is not supported by NI; it is not mentioned in the docs and there is a warning when building the NI.

@Akirathan
Copy link
Member Author

Akirathan commented Jan 16, 2026

Yesterdays release, based on b24f35e, inside https://github.com/enso-org/enso/releases/tag/2026.1.1-nightly.2026.1.15.1 :

  • Does not contain Standard.Image.
  • Works in JVM mode - downloads the Standard.Image and is able to use it.
    • See output of execution with --jvm.
  • Is still failing to download the library in native mode:
    • See output of native execution.
    • Should be fixed by enabling both jar and https protocols in NI build by 173fd74
GitHub
Download Enso IDE Enso IDE is the main product of the Enso project. The packages are stand-alone, they contain both GUI and the backend. Download links:

Windows
Linux
macOS (Apple silicon)

This i...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: Clean build required CI runners will be cleaned before and after this PR is built. CI: No changelog needed Do not require a changelog entry for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change release process to upload custom edition

2 participants