From 7a0a26dcf73be7a5d66169b58bf661c3f6221b48 Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Tue, 27 Jan 2026 01:48:08 +0100 Subject: [PATCH] extension_ci: Set default target for all jobs (#47712) Following the changes to the namespace caching, CI in the extensions broke because cache conflicts arose there seemingly. Trying to set the target here more explicitly in an effort to fix this. Release Notes: - N/A --- .github/workflows/extension_tests.yml | 1 + Cargo.lock | 1 + crates/extension/src/extension_builder.rs | 2 +- tooling/xtask/Cargo.toml | 1 + tooling/xtask/src/tasks/workflows/extension_tests.rs | 4 ++++ 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/extension_tests.yml b/.github/workflows/extension_tests.yml index 5584a5f35add88e4e223a34fbd2198e6996d388f..90c7552ee1cc16f2e2193cf7de2696202afacffd 100644 --- a/.github/workflows/extension_tests.yml +++ b/.github/workflows/extension_tests.yml @@ -6,6 +6,7 @@ env: RUST_BACKTRACE: '1' CARGO_INCREMENTAL: '0' ZED_EXTENSION_CLI_SHA: 7cfce605704d41ca247e3f84804bf323f6c6caaf + CARGO_BUILD_TARGET: wasm32-wasip2 on: workflow_call: {} jobs: diff --git a/Cargo.lock b/Cargo.lock index 5ec4a4414ab08aaea33cf22f19aa63e62fb8a0ed..0329e18e32a943736231256a1abb4f92b42e1735 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20688,6 +20688,7 @@ dependencies = [ "cargo_metadata", "cargo_toml", "clap", + "extension", "gh-workflow", "indexmap", "indoc", diff --git a/crates/extension/src/extension_builder.rs b/crates/extension/src/extension_builder.rs index 6d7c3206e8811c88781348946b07fd0f81dd5c3b..252c8f00b4481747266d5a08ec21be91f00ce40b 100644 --- a/crates/extension/src/extension_builder.rs +++ b/crates/extension/src/extension_builder.rs @@ -19,7 +19,7 @@ use wasm_encoder::{ComponentSectionId, Encode as _, RawSection, Section as _}; use wasmparser::Parser; /// Currently, we compile with Rust's `wasm32-wasip2` target, which works with WASI `preview2` and the component model. -const RUST_TARGET: &str = "wasm32-wasip2"; +pub const RUST_TARGET: &str = "wasm32-wasip2"; /// Compiling Tree-sitter parsers from C to WASM requires Clang 17, and a WASM build of libc /// and clang's runtime library. The `wasi-sdk` provides these binaries. diff --git a/tooling/xtask/Cargo.toml b/tooling/xtask/Cargo.toml index 13179b2eb69ba9a63ba6be5784907b78bba1b9f2..8f775b44038fc2dcc14ee451066a49742c873da8 100644 --- a/tooling/xtask/Cargo.toml +++ b/tooling/xtask/Cargo.toml @@ -14,6 +14,7 @@ backtrace.workspace = true cargo_metadata.workspace = true cargo_toml.workspace = true clap = { workspace = true, features = ["derive"] } +extension.workspace = true toml.workspace = true indoc.workspace = true indexmap.workspace = true diff --git a/tooling/xtask/src/tasks/workflows/extension_tests.rs b/tooling/xtask/src/tasks/workflows/extension_tests.rs index 9183c61da105e3fda4ae37d8238f2327a2c8dde2..9d7e233d562fd634960454a6490d8a861459763d 100644 --- a/tooling/xtask/src/tasks/workflows/extension_tests.rs +++ b/tooling/xtask/src/tasks/workflows/extension_tests.rs @@ -32,6 +32,10 @@ pub(crate) fn extension_tests() -> Workflow { .add_env(("RUST_BACKTRACE", 1)) .add_env(("CARGO_INCREMENTAL", 0)) .add_env(("ZED_EXTENSION_CLI_SHA", ZED_EXTENSION_CLI_SHA)) + .add_env(( + "CARGO_BUILD_TARGET", + extension::extension_builder::RUST_TARGET, + )) .map(|workflow| { jobs.into_iter() .chain([tests_pass])