Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a222384
typo
Akirathan Jan 1, 2026
617a466
Move Image library from Standard to Enso namespace
Akirathan Jan 1, 2026
15effe8
docs for the Enso lib namespace.
Akirathan Jan 1, 2026
a2bad60
reflect stdlib namespace change in sbt build
Akirathan Jan 1, 2026
467a5ad
createEngineDistribution does not copy regular files.
Akirathan Jan 1, 2026
ea44b7b
Deduplicate Editions.writeEditionConfig sbt task
Akirathan Jan 1, 2026
610164b
Fix cleanFiles for editions project.
Akirathan Jan 1, 2026
a5abad0
Generate correct editions yaml file - Image is not in Standard namesp…
Akirathan Jan 1, 2026
61661e5
fix imports in Image_Tests
Akirathan Jan 1, 2026
96bb729
fix service registration in Image/package.yaml
Akirathan Jan 1, 2026
949bd00
`Enso.Image` has the same version as standard libraries
Akirathan Jan 2, 2026
237fec5
Do not verrify Image generated package
Akirathan Jan 2, 2026
b24a7e9
Update NativeLibraryFinderTest
Akirathan Jan 2, 2026
344c54a
Fix Image name in another Enso test
Akirathan Jan 2, 2026
6850206
[rust build script] Upload extension libs as asset to the release
Akirathan Jan 5, 2026
b0ef670
do not assets url path
Akirathan Jan 5, 2026
06e526f
Upload `extension-libs.zip` only once.
Akirathan Jan 5, 2026
fd8bb22
opencv-wrapper does not discard native libs from other platforms.
Akirathan Jan 6, 2026
87721f4
fmt
Akirathan Jan 6, 2026
88635e7
Move Enso.Image back to Standard namespace
Akirathan Jan 9, 2026
32b376e
Refactor Enso.Image to Standard.Image usages
Akirathan Jan 9, 2026
295ad89
Use template for edition config
Akirathan Jan 9, 2026
b2e943e
Merge branch 'develop' into wip/akirathan/release-lib
Akirathan Jan 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 23 additions & 28 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4688,16 +4688,17 @@ lazy val editions = project
.dependsOn(
Def.task {
Editions.writeEditionConfig(
editionsRoot = file("distribution") / "editions",
ensoVersion = ensoVersion,
editionName = currentEdition,
libraryVersion = stdLibVersion,
log = streams.value.log
editionsRoot = file("distribution") / "editions",
editionTemplate = file("distribution") / "edition.template.yaml",
ensoVersion = ensoVersion,
editionName = currentEdition,
libraryVersion = stdLibVersion,
log = streams.value.log
)
}
)
.value,
cleanFiles += baseDirectory.value / ".." / ".." / "distribution" / "editions"
cleanFiles += (ThisBuild / baseDirectory).value / "distribution" / "editions"
)
.dependsOn(semver)
.dependsOn(testkit % Test)
Expand Down Expand Up @@ -4728,22 +4729,6 @@ lazy val semver = project
(`scala-yaml` / Compile / exportedModule).value
)
)
.settings(
(Compile / compile) := (Compile / compile)
.dependsOn(
Def.task {
Editions.writeEditionConfig(
editionsRoot = file("distribution") / "editions",
ensoVersion = ensoVersion,
editionName = currentEdition,
libraryVersion = stdLibVersion,
log = streams.value.log
)
}
)
.value,
cleanFiles += baseDirectory.value / ".." / ".." / "distribution" / "editions"
)
.dependsOn(`scala-yaml`)
.dependsOn(testkit % Test)

Expand Down Expand Up @@ -5008,6 +4993,7 @@ lazy val `locking-test-helper` = project
)

val `std-lib-root` = file("distribution/lib/Standard/")

def stdLibComponentRoot(name: String): File =
`std-lib-root` / name / stdLibVersion
val `base-polyglot-root` = stdLibComponentRoot("Base") / "polyglot" / "java"
Expand Down Expand Up @@ -5309,12 +5295,21 @@ lazy val `opencv-wrapper` = project
),
inputJar := "org.openpnp" % "opencv" % opencvVersion,
jarExtractor := JarExtractor(
"nu/pattern/opencv/linux/x86_64/*.so" -> PolyglotLib(LinuxAMD64),
"nu/pattern/opencv/osx/ARMv8/*.dylib" -> PolyglotLib(MacOSArm64),
"nu/pattern/opencv/windows/x86_64/*.dll" -> PolyglotLib(WindowsAMD64),
"nu/pattern/*.class" -> CopyToOutputJar,
"META-INF/**" -> CopyToOutputJar,
"org/**" -> CopyToOutputJar
"nu/pattern/opencv/linux/x86_64/*.so" -> PolyglotLib(
LinuxAMD64,
matchArch = false
),
"nu/pattern/opencv/osx/ARMv8/*.dylib" -> PolyglotLib(
MacOSArm64,
matchArch = false
),
"nu/pattern/opencv/windows/x86_64/*.dll" -> PolyglotLib(
WindowsAMD64,
matchArch = false
),
"nu/pattern/*.class" -> CopyToOutputJar,
"META-INF/**" -> CopyToOutputJar,
"org/**" -> CopyToOutputJar
)
)

Expand Down
1 change: 1 addition & 0 deletions build_tools/build/paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
rust/:
test-results/:
small-jdk/:
extension-libs.zip:
test/:
Benchmarks/:
tools/:
Expand Down
4 changes: 4 additions & 0 deletions build_tools/build/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ pub struct BuildConfigurationFlags {
pub verify_packages: bool,
pub stdlib_api_check: bool,
pub run_enso_lint: bool,
/// URL that should be used for a `main` repository in the
/// edition.
pub library_repo_url: Option<String>,
}

#[derive(Clone, Debug)]
Expand Down Expand Up @@ -336,6 +339,7 @@ impl Default for BuildConfigurationFlags {
extra_java_tool_opts: None,
build_small_jdk: false,
small_jdk_dir: None,
library_repo_url: None,
build_benchmarks: false,
check_enso_benchmarks: false,
execute_benchmarks: default(),
Expand Down
34 changes: 32 additions & 2 deletions build_tools/build/src/engine/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ use crate::project::ProcessWrapper;

use ide_ci::actions::workflow::is_in_env;
use ide_ci::cache;
use ide_ci::github::release::IsReleaseExt;
use ide_ci::github::release::{Handle, IsReleaseExt};
use ide_ci::platform::DEFAULT_SHELL;
use ide_ci::programs::sbt;
use ide_ci::programs::Sbt;
use octocrab::models::repos::Release;
use std::env::consts::DLL_EXTENSION;
use std::env::consts::EXE_EXTENSION;

Expand Down Expand Up @@ -265,6 +266,10 @@ impl RunContext {
// we don't want to call this in environments like GH-hosted runners.

// === Build distributions and native images ===
if let Some(repo_url) = self.config.library_repo_url.clone() {
debug!("Using library repository in main edition: {}", repo_url);
env::ENSO_MAIN_LIBRARY_REPOSITORY_URL.set(&repo_url)?;
}
let mut tasks = vec![];
let mut run_sbt_clean = false;
if self.config.build_engine_package {
Expand Down Expand Up @@ -443,7 +448,7 @@ impl RunContext {
package.verify_package_sbt(&sbt).await?;
}
if self.config.build_engine_package {
for libname in ["Base", "Table", "Image", "Database"] {
for libname in ["Base", "Table", "Database"] {
let lib_path = self
.repo_root
.built_distribution
Expand Down Expand Up @@ -488,6 +493,10 @@ impl RunContext {
if TARGET_OS == OS::Linux {
release.upload_asset_file(self.paths.manifest_file()).await?;
release.upload_asset_file(self.paths.launcher_manifest_file()).await?;
if self.config.library_repo_url.clone().is_some() {
let zip = self.create_extension_libs_zip().await?;
release.upload_asset_file(zip).await?;
}
}
}
},
Expand Down Expand Up @@ -632,6 +641,27 @@ impl RunContext {
}
}

/// Creates a zip archive that contains all the extension libraries.
/// This ZIP should be later uploaded as an artifact to the GH
/// release.
async fn create_extension_libs_zip(&self) -> Result<PathBuf> {
debug!("Creating ZIP of all extension libraries");
let zip_path = self.repo_root.target.extension_libs_zip.path.clone();
let libs_root_dir = self.extension_libs_root_dir()?;
let paths = vec![libs_root_dir];
ide_ci::archive::create(&zip_path, paths).await?;
Ok(zip_path)
}

/// Returns root directory for all the extension libraries.
fn extension_libs_root_dir(&self) -> Result<PathBuf> {
let lib_root_dir =
self.repo_root.built_distribution.enso_engine_triple.engine_package.lib.clone();
let lib_root_dir = lib_root_dir.canonicalize()?;
let extension_libs_root_dir = lib_root_dir.join("Enso");
Ok(extension_libs_root_dir)
}

fn short_path(&self, full: &Path) -> PathBuf {
let strip = full.strip_prefix(self.repo_root.path.clone());
if let Ok(relative) = strip {
Expand Down
4 changes: 4 additions & 0 deletions build_tools/build/src/engine/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ define_env_var! {

//// path to JUnit output directory
ENSO_TEST_JUNIT_DIR, String;

/// URL of the main editions library repository which will be written
/// to the `editions.yaml` by sbt.
ENSO_MAIN_LIBRARY_REPOSITORY_URL, String;
}
4 changes: 2 additions & 2 deletions build_tools/build/src/release/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ impl Asset {
Self { os: triple.os, arch: triple.arch, url, target_pretty }
}

/// Description od the asset with IDE image.
/// Description of the asset with IDE image.
pub fn new_ide(repo: &impl IsRepo, triple: &TargetTriple) -> Self {
let filename =
project::ide::electron_image_filename(triple.os, triple.arch, &triple.versions.version);
let url = ide_ci::github::release::download_asset(repo, &triple.versions.version, filename);
Self::new(url, triple)
}

/// Description od the asset with Engine bundle.
/// Description of the asset with Engine bundle.
pub fn new_engine(repo: &impl IsRepo, triple: &TargetTriple) -> Self {
use crate::paths::generated::RepoRootBuiltDistributionEnsoBundleTriple;
let stem = RepoRootBuiltDistributionEnsoBundleTriple::segment_name(triple.to_string());
Expand Down
33 changes: 32 additions & 1 deletion build_tools/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use crate::arg::WatchJob;
use anyhow::Context;
use arg::BuildDescription;
use clap::Parser;
use enso_build::cloud_tests;
use enso_build::config::Config;
use enso_build::context::BuildContext;
use enso_build::engine::context::EnginePackageProvider;
Expand Down Expand Up @@ -57,6 +56,7 @@ use enso_build::source::Source;
use enso_build::source::WatchTargetJob;
use enso_build::source::WithDestination;
use enso_build::version;
use enso_build::{cloud_tests, env};
use ide_ci::actions::workflow::is_in_env;
use ide_ci::cache::goodie::graalvm;
use ide_ci::cache::Cache;
Expand Down Expand Up @@ -303,8 +303,10 @@ impl Processor {
let repo = self.remote_repo.clone();
let context = self.context();
let small_jdk_dir = context.repo_root.target.small_jdk.path.clone();
let cloned_self = self.clone();
async move {
let input = input.await?;
let extension_lib_url = cloned_self.extensions_lib_url().await?;
let operation = enso_build::engine::Operation::Release(
enso_build::engine::ReleaseOperation {
repo,
Expand All @@ -318,6 +320,7 @@ impl Processor {
build_small_jdk: true,
small_jdk_dir: Some(small_jdk_dir),
verify_packages: true,
library_repo_url: extension_lib_url,
..default()
};
let context = input.prepare_context(context, config)?;
Expand Down Expand Up @@ -524,6 +527,34 @@ impl Processor {
.boxed()
}

/// Returns URL to the extension library zip archive. This URL points to an artifact from the release.
/// If [env::RELEASE_ID] is not set, it returns None.
///
/// The returned URL has a format similar to:
/// `jar:https://github.com/enso-org/enso/releases/download/2025.4.1-nightly.2025.12.28/extension-libs.zip`
async fn extensions_lib_url(&self) -> Result<Option<String>> {
match env::ENSO_RELEASE_ID.get() {
Ok(_) => {
let extension_libs_fname = self
.repo_root
.target
.extension_libs_zip
.as_path()
.file_name()
.unwrap()
.to_str()
.unwrap();
let tag = version::ENSO_VERSION.get()?;
let final_url = format!(
"jar:https://github.com/enso-org/enso/releases/download/{}/{}",
tag, extension_libs_fname
);
Ok(Some(final_url))
}
Err(_) => Ok(None),
}
}

/// Add options to produce heap dumps on OOM errors.
/// It is essential to pass the `-XX:+HeapDumpOnOutOfMemoryError` option both via
/// `JAVA_TOOL_OPTIONS` env var and as a command line argument to the runner.
Expand Down
73 changes: 73 additions & 0 deletions distribution/edition.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# 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.
#
# Parameters for the template:
# - ENGINE_VERSION: the version of the engine to use in this edition.
# - LIBS_VERSION: version of all the standard libraries.
# - MAIN_REPO_URL: URL of the main repository hosting the standard libraries.
# - STD_IMAGE_REPO_URL: URL of the repository hosting the Standard.Image library.

engine-version: {{ENGINE_VERSION}}
repositories:
- name: main
url: {{MAIN_REPO_URL}}
- name: std_image_repo
url: {{STD_IMAGE_REPO_URL}}
libraries:
- name: Standard.Base
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Test
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Table
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Database
repository: main
version: {{LIBS_VERSION}}
- name: Standard.AWS
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Geo
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Visualization
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Examples
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Searcher
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Generic_JDBC
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Google
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Google_Api
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Snowflake
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Microsoft
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Tableau
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Saas
repository: main
version: {{LIBS_VERSION}}
- name: Standard.DuckDB
repository: main
version: {{LIBS_VERSION}}
- name: Standard.Image
repository: std_image_repo
version: {{LIBS_VERSION}}
Loading
Loading