From af4a7776c97deff158e9dadca9b9accf4009d84e Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Sun, 1 Nov 2026 23:43:26 -0800 Subject: [PATCH 1/9] chore(quest): claim quest/m0/checks/cache.md Quest-Claim: 8db415673a8cd2e6 From 03d3a7bdc3ab3b6aeb2be65f8abeed7292d6617c Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Sun, 1 Nov 2026 23:48:02 -0800 Subject: [PATCH 2/9] chore: put mbx's Cargo shim ahead of the dev shell's toolchains Co-Authored-By: Claude Opus 5.5 --- driver/justfile | 4 +++- ffi/justfile | 4 +++- flake.nix | 15 +++++++++++++++ ts/justfile | 4 +++- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/driver/justfile b/driver/justfile index ae3235a51..da5054f0d 100644 --- a/driver/justfile +++ b/driver/justfile @@ -6,7 +6,9 @@ set shell := ["bash", "-euo", "pipefail", "-c"] -export PATH := if env("RUST2_TS_TOOLCHAIN", "") == "" { env("PATH") } else { env("RUST2_TS_TOOLCHAIN") / "bin:" + env("PATH") } +# mbx's Cargo shim, which the dev shell exports, stays ahead of the nightly so cargo still builds through it. +cargo_shim := if env("RUST2_CARGO_SHIM", "") == "" { "" } else { env("RUST2_CARGO_SHIM") + ":" } +export PATH := if env("RUST2_TS_TOOLCHAIN", "") == "" { env("PATH") } else { cargo_shim + env("RUST2_TS_TOOLCHAIN") / "bin:" + env("PATH") } default: @just --list diff --git a/ffi/justfile b/ffi/justfile index 0fa3a1e99..ffc34f56c 100644 --- a/ffi/justfile +++ b/ffi/justfile @@ -6,7 +6,9 @@ set shell := ["bash", "-euo", "pipefail", "-c"] -export PATH := if env("RUST2_TS_TOOLCHAIN", "") == "" { env("PATH") } else { env("RUST2_TS_TOOLCHAIN") / "bin:" + env("PATH") } +# mbx's Cargo shim, which the dev shell exports, stays ahead of the nightly so cargo still builds through it. +cargo_shim := if env("RUST2_CARGO_SHIM", "") == "" { "" } else { env("RUST2_CARGO_SHIM") + ":" } +export PATH := if env("RUST2_TS_TOOLCHAIN", "") == "" { env("PATH") } else { cargo_shim + env("RUST2_TS_TOOLCHAIN") / "bin:" + env("PATH") } # The moq revision these recipes export by default, behind `just ts moq`'s: moq's later API # needs moq/ffi.toml to follow it, and past moq-dev/moq#7032 moq-tokio's `Send` check diff --git a/flake.nix b/flake.nix index 7359561e6..762f1e040 100644 --- a/flake.nix +++ b/flake.nix @@ -308,6 +308,21 @@ RUST2_TS_TOOLCHAIN = tsToolchain; RUST2_TS_SYSROOT = rust2-ts-std; KOTLINX_COROUTINES = "${kotlinx-coroutines}"; + # The pinned toolchain goes on PATH ahead of everything the host had, which + # shadows the Cargo shim `mbx setup` installs. Put it back in front, as moq's dev + # shell does, so cargo builds through mbx's cache wherever the host set one up, + # the land gate included. The nightly projects' justfiles keep it ahead of their + # toolchain through RUST2_CARGO_SHIM. `setup --status` names the shim on its first + # line even when it is missing, and its exit code also fails over unrelated setup, + # so only the shim existing decides. + shellHook = '' + shim=$(mbx setup --status 2>/dev/null | sed -n '1s/.*: //p' || true) + if [ -x "$shim" ]; then + export RUST2_CARGO_SHIM=''${shim%/*} + export PATH="$RUST2_CARGO_SHIM:$PATH" + fi + unset shim + ''; }; # `just ts bench` adds Chrome and Firefox as engines. Apart for their size. devShells.bench = self.devShells.${system}.default.overrideAttrs (old: { diff --git a/ts/justfile b/ts/justfile index 8a1315ac2..27e968750 100644 --- a/ts/justfile +++ b/ts/justfile @@ -6,7 +6,9 @@ set shell := ["bash", "-euo", "pipefail", "-c"] -export PATH := if env("RUST2_TS_TOOLCHAIN", "") == "" { env("PATH") } else { env("RUST2_TS_TOOLCHAIN") / "bin:" + env("PATH") } +# mbx's Cargo shim, which the dev shell exports, stays ahead of the nightly so cargo still builds through it. +cargo_shim := if env("RUST2_CARGO_SHIM", "") == "" { "" } else { env("RUST2_CARGO_SHIM") + ":" } +export PATH := if env("RUST2_TS_TOOLCHAIN", "") == "" { env("PATH") } else { cargo_shim + env("RUST2_TS_TOOLCHAIN") / "bin:" + env("PATH") } # The moq revision `moq` translates by default. moq_rev := "4b8e37bd44e407b3416a17992720870ea3f9221c" From f0ecaab71a98621e1529e30a1b980825cdd83649 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Mon, 2 Nov 2026 01:16:03 -0800 Subject: [PATCH 3/9] fix(uniffi): resolve generate_and_include_scaffolding!'s path from the calling file trybuild compiles from inside the target directory, which mbx's managed target moves out of the checkout. Co-Authored-By: Claude Opus 5.5 --- quest/m0/checks/cache.md | 7 +++++- uniffi/README.md | 3 +++ ...rors_used_in_callbacks_cant_have_fields.rs | 4 ++-- .../tests/ui/interface_cannot_use_mut_self.rs | 4 ++-- .../tests/ui/interface_not_sync_and_send.rs | 4 ++-- .../ui/interface_trait_not_sync_and_send.rs | 4 ++-- .../tests/ui/non_hashable_record_key.rs | 4 ++-- .../tests/ui/trait_methods_no_trait.rs | 4 ++-- .../tests/ui/trait_methods_unknown_trait.rs | 4 ++-- .../ui/trait_methods_unknown_trait.stderr | 6 ++--- .../uitests/tests/ui/typedef_extern.rs | 4 ++-- .../uitests/tests/ui/typedef_extern.stderr | 6 ++--- uniffi/uniffi_macros/src/lib.rs | 22 ++++++++++++++----- 13 files changed, 48 insertions(+), 28 deletions(-) diff --git a/quest/m0/checks/cache.md b/quest/m0/checks/cache.md index fccec89aa..ef050ebb8 100644 --- a/quest/m0/checks/cache.md +++ b/quest/m0/checks/cache.md @@ -1,4 +1,4 @@ -# [S] A warm gate +# [XS] A warm gate ## Goal @@ -13,4 +13,9 @@ gate has. PR code can write to it, a risk moq already accepts; mbx keys each com its compiler, target, and inputs. Local worktrees share it too, where the dev shell already can. +The dev shell already puts mbx's Cargo shim ahead of its toolchains wherever `mbx setup` +installed one. What remains is the host: kixelated/nixos's `rust2` land instance mounts and +configures an mbx cache, as its `moq-pro` instance does with `mbxCheck`. Check it by +reading a gate run's log for mbx's cache summary. + Public API: none. diff --git a/uniffi/README.md b/uniffi/README.md index 593ef6701..f367a7ff5 100644 --- a/uniffi/README.md +++ b/uniffi/README.md @@ -88,6 +88,9 @@ uniffi-rs: - Scaffolding is written to a temporary file and renamed into place. Two trybuild cases expanding `generate_and_include_scaffolding!` on one UDL write it concurrently, and the in-place truncate let one include a partial file. +- `generate_and_include_scaffolding!` takes a path relative to the calling file, not to + rustc's working directory: trybuild compiles from inside the target directory, which a + build cache such as mbx moves out of the checkout. - The bindgen tests generate into a directory per test instead of one per language, so they run under nextest, which runs each test in its own process. - `uniffi_bindgen` has no `askama.toml`: its templates move from `src/**/templates` to diff --git a/uniffi/fixtures/uitests/tests/ui/fieldless_errors_used_in_callbacks_cant_have_fields.rs b/uniffi/fixtures/uitests/tests/ui/fieldless_errors_used_in_callbacks_cant_have_fields.rs index c7e7bdc40..7a8499860 100644 --- a/uniffi/fixtures/uitests/tests/ui/fieldless_errors_used_in_callbacks_cant_have_fields.rs +++ b/uniffi/fixtures/uitests/tests/ui/fieldless_errors_used_in_callbacks_cant_have_fields.rs @@ -1,5 +1,5 @@ -// Unfortunately, path is relative to a temporary build directory :-/ -uniffi_macros::generate_and_include_scaffolding!("../../../../uniffi/fixtures/uitests/src/errors.udl"); +// The path is relative to this file. +uniffi_macros::generate_and_include_scaffolding!("../../src/errors.udl"); fn main() { /* empty main required by `trybuild` */} diff --git a/uniffi/fixtures/uitests/tests/ui/interface_cannot_use_mut_self.rs b/uniffi/fixtures/uitests/tests/ui/interface_cannot_use_mut_self.rs index c0926b813..756a7e1d8 100644 --- a/uniffi/fixtures/uitests/tests/ui/interface_cannot_use_mut_self.rs +++ b/uniffi/fixtures/uitests/tests/ui/interface_cannot_use_mut_self.rs @@ -1,6 +1,6 @@ -// Unfortunately, path is relative to a temporary build directory :-/ -uniffi_macros::generate_and_include_scaffolding!("../../../../uniffi/fixtures/uitests/src/counter.udl"); +// The path is relative to this file. +uniffi_macros::generate_and_include_scaffolding!("../../src/counter.udl"); fn main() { /* empty main required by `trybuild` */} diff --git a/uniffi/fixtures/uitests/tests/ui/interface_not_sync_and_send.rs b/uniffi/fixtures/uitests/tests/ui/interface_not_sync_and_send.rs index 71710a653..b5da05dc2 100644 --- a/uniffi/fixtures/uitests/tests/ui/interface_not_sync_and_send.rs +++ b/uniffi/fixtures/uitests/tests/ui/interface_not_sync_and_send.rs @@ -1,8 +1,8 @@ use std::cell::Cell; -// Unfortunately, path is relative to a temporary build directory :-/ -uniffi_macros::generate_and_include_scaffolding!("../../../../uniffi/fixtures/uitests/src/counter.udl"); +// The path is relative to this file. +uniffi_macros::generate_and_include_scaffolding!("../../src/counter.udl"); fn main() { /* empty main required by `trybuild` */} diff --git a/uniffi/fixtures/uitests/tests/ui/interface_trait_not_sync_and_send.rs b/uniffi/fixtures/uitests/tests/ui/interface_trait_not_sync_and_send.rs index 540f9b2fe..1d337e832 100644 --- a/uniffi/fixtures/uitests/tests/ui/interface_trait_not_sync_and_send.rs +++ b/uniffi/fixtures/uitests/tests/ui/interface_trait_not_sync_and_send.rs @@ -1,5 +1,5 @@ -// Unfortunately, path is relative to a temporary build directory :-/ -uniffi_macros::generate_and_include_scaffolding!("../../../../uniffi/fixtures/uitests/src/trait.udl"); +// The path is relative to this file. +uniffi_macros::generate_and_include_scaffolding!("../../src/trait.udl"); fn main() { /* empty main required by `trybuild` */} diff --git a/uniffi/fixtures/uitests/tests/ui/non_hashable_record_key.rs b/uniffi/fixtures/uitests/tests/ui/non_hashable_record_key.rs index 8cbab4a10..59e69addb 100644 --- a/uniffi/fixtures/uitests/tests/ui/non_hashable_record_key.rs +++ b/uniffi/fixtures/uitests/tests/ui/non_hashable_record_key.rs @@ -1,4 +1,4 @@ -// Unfortunately, path is relative to a temporary build directory :-/ -uniffi_macros::generate_and_include_scaffolding!("../../../../uniffi/fixtures/uitests/src/records.udl"); +// The path is relative to this file. +uniffi_macros::generate_and_include_scaffolding!("../../src/records.udl"); fn main() { /* empty main required by `trybuild` */} diff --git a/uniffi/fixtures/uitests/tests/ui/trait_methods_no_trait.rs b/uniffi/fixtures/uitests/tests/ui/trait_methods_no_trait.rs index c9b39e573..e5f1af6c2 100644 --- a/uniffi/fixtures/uitests/tests/ui/trait_methods_no_trait.rs +++ b/uniffi/fixtures/uitests/tests/ui/trait_methods_no_trait.rs @@ -1,5 +1,5 @@ -// Unfortunately, path is relative to a temporary build directory :-/ -uniffi_macros::generate_and_include_scaffolding!("../../../../uniffi/fixtures/trait-methods/src/trait_methods.udl"); +// The path is relative to this file. +uniffi_macros::generate_and_include_scaffolding!("../../../trait-methods/src/trait_methods.udl"); fn main() { /* empty main required by `trybuild` */} diff --git a/uniffi/fixtures/uitests/tests/ui/trait_methods_unknown_trait.rs b/uniffi/fixtures/uitests/tests/ui/trait_methods_unknown_trait.rs index 2fd9299d1..768876131 100644 --- a/uniffi/fixtures/uitests/tests/ui/trait_methods_unknown_trait.rs +++ b/uniffi/fixtures/uitests/tests/ui/trait_methods_unknown_trait.rs @@ -1,5 +1,5 @@ -// Unfortunately, path is relative to a temporary build directory :-/ -uniffi_macros::generate_and_include_scaffolding!("../../../../uniffi/fixtures/uitests/src/trait_methods_unknown_trait.udl"); +// The path is relative to this file. +uniffi_macros::generate_and_include_scaffolding!("../../src/trait_methods_unknown_trait.udl"); fn main() { /* empty main required by `trybuild` */} diff --git a/uniffi/fixtures/uitests/tests/ui/trait_methods_unknown_trait.stderr b/uniffi/fixtures/uitests/tests/ui/trait_methods_unknown_trait.stderr index c8aaa57c4..f9f62b6d5 100644 --- a/uniffi/fixtures/uitests/tests/ui/trait_methods_unknown_trait.stderr +++ b/uniffi/fixtures/uitests/tests/ui/trait_methods_unknown_trait.stderr @@ -1,7 +1,7 @@ -error: Failed to generate scaffolding from UDL file at ../../../../uniffi/fixtures/uitests/src/trait_methods_unknown_trait.udl: parsing udl file ../../../../uniffi/fixtures/uitests/src/trait_methods_unknown_trait.udl: Invalid trait name: PartialEq +error: Failed to generate scaffolding from UDL file at ../../src/trait_methods_unknown_trait.udl: parsing udl file $DIR/tests/ui/../../src/trait_methods_unknown_trait.udl: Invalid trait name: PartialEq --> tests/ui/trait_methods_unknown_trait.rs:2:1 | -2 | uniffi_macros::generate_and_include_scaffolding!("../../../../uniffi/fixtures/uitests/src/trait_methods_unknown_trait.udl"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 | uniffi_macros::generate_and_include_scaffolding!("../../src/trait_methods_unknown_trait.udl"); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in the macro `uniffi_macros::generate_and_include_scaffolding` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/uniffi/fixtures/uitests/tests/ui/typedef_extern.rs b/uniffi/fixtures/uitests/tests/ui/typedef_extern.rs index 6018e191a..405b51ea6 100644 --- a/uniffi/fixtures/uitests/tests/ui/typedef_extern.rs +++ b/uniffi/fixtures/uitests/tests/ui/typedef_extern.rs @@ -1,4 +1,4 @@ -// Unfortunately, path is relative to a temporary build directory :-/ -uniffi_macros::generate_and_include_scaffolding!("../../../../uniffi/fixtures/uitests/src/typedef_extern.udl"); +// The path is relative to this file. +uniffi_macros::generate_and_include_scaffolding!("../../src/typedef_extern.udl"); fn main() { /* empty main required by `trybuild` */} diff --git a/uniffi/fixtures/uitests/tests/ui/typedef_extern.stderr b/uniffi/fixtures/uitests/tests/ui/typedef_extern.stderr index 779ac679a..7fa8435bf 100644 --- a/uniffi/fixtures/uitests/tests/ui/typedef_extern.stderr +++ b/uniffi/fixtures/uitests/tests/ui/typedef_extern.stderr @@ -1,4 +1,4 @@ -error: Failed to generate scaffolding from UDL file at ../../../../uniffi/fixtures/uitests/src/typedef_extern.udl: parsing udl file ../../../../uniffi/fixtures/uitests/src/typedef_extern.udl: `typedef extern` is no longer supported. +error: Failed to generate scaffolding from UDL file at ../../src/typedef_extern.udl: parsing udl file $DIR/tests/ui/../../src/typedef_extern.udl: `typedef extern` is no longer supported. You must replace `extern` with the type of the object: * "enum" for Enums. * "record", "dictionary" or "struct" for Records. @@ -24,7 +24,7 @@ error: Failed to generate scaffolding from UDL file at ../../../../uniffi/fixtur See https://mozilla.github.io/uniffi-rs/next/types/custom_types.html for more. --> tests/ui/typedef_extern.rs:2:1 | -2 | uniffi_macros::generate_and_include_scaffolding!("../../../../uniffi/fixtures/uitests/src/typedef_extern.udl"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 | uniffi_macros::generate_and_include_scaffolding!("../../src/typedef_extern.udl"); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in the macro `uniffi_macros::generate_and_include_scaffolding` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/uniffi/uniffi_macros/src/lib.rs b/uniffi/uniffi_macros/src/lib.rs index 0bc223730..58b5d116b 100644 --- a/uniffi/uniffi_macros/src/lib.rs +++ b/uniffi/uniffi_macros/src/lib.rs @@ -10,7 +10,7 @@ //! Macros for `uniffi`. #[cfg(feature = "trybuild")] -use camino::Utf8Path; +use camino::Utf8PathBuf; use proc_macro::TokenStream; use quote::quote; use syn::{parse_macro_input, LitStr}; @@ -275,8 +275,9 @@ pub fn use_remote_type(tokens: TokenStream) -> TokenStream { /// /// This is a convenience macro designed for writing `trybuild`-style tests and /// probably shouldn't be used for production code. Given the path to a `.udl` file, -/// if will run `uniffi-bindgen` to produce the corresponding Rust scaffolding and then -/// include it directly into the calling file. Like so: +/// relative to the calling file as `include_str!`'s is, it will run `uniffi-bindgen` to +/// produce the corresponding Rust scaffolding and then include it directly into the calling +/// file. Like so: /// /// ```rs /// uniffi_macros::generate_and_include_scaffolding!("path/to/my/interface.udl"); @@ -285,8 +286,19 @@ pub fn use_remote_type(tokens: TokenStream) -> TokenStream { #[cfg(feature = "trybuild")] pub fn generate_and_include_scaffolding(udl_file: TokenStream) -> TokenStream { let udl_file = syn::parse_macro_input!(udl_file as LitStr); - let udl_file_string = udl_file.value(); - let udl_file_path = Utf8Path::new(&udl_file_string); + // Not relative to rustc's working directory, which is trybuild's project inside the target + // directory, and that need not sit in the checkout. + let Some(udl_file_path) = proc_macro::Span::call_site() + .local_file() + .and_then(|file| Utf8PathBuf::from_path_buf(file).ok()) + .and_then(|file| Some(file.parent()?.join(udl_file.value()))) + else { + return quote! { + compile_error!("generate_and_include_scaffolding! needs a UTF-8 path to the invoking file"); + } + .into(); + }; + let udl_file_path = udl_file_path.as_path(); if std::env::var("OUT_DIR").is_err() { quote! { compile_error!("This macro assumes the crate has a build.rs script, but $OUT_DIR is not present"); From 413bf17a132de8e0c8eaaa6d0c522023611872d1 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Mon, 2 Nov 2026 01:43:39 -0800 Subject: [PATCH 4/9] chore(quest): note mbx's placeholder leak blocking the warm gate Co-Authored-By: Claude Opus 5.5 --- quest/m0/checks/cache.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/quest/m0/checks/cache.md b/quest/m0/checks/cache.md index ef050ebb8..8ed78786b 100644 --- a/quest/m0/checks/cache.md +++ b/quest/m0/checks/cache.md @@ -18,4 +18,9 @@ installed one. What remains is the host: kixelated/nixos's `rust2` land instance configures an mbx cache, as its `moq-pro` instance does with `mbxCheck`. Check it by reading a gate run's log for mbx's cache summary. +Through mbx 1.29.1, `uniffi_uitests` fails: the diagnostics of rustc runs that trybuild's +nested cargo starts through mbx's wrapper keep the `${target}` placeholder mbx stores paths +under, so trybuild cannot match its snapshots. `MBX_DISABLE=1` passes. Get it fixed in mbx +(jdx/mr-boxington), or decide with the maintainer to keep that test off mbx meanwhile. + Public API: none. From b693dd9f02c2b5d6bd0f530aef7c197ae2bc61d8 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Mon, 2 Nov 2026 01:46:48 -0800 Subject: [PATCH 5/9] docs(uniffi): note generate_and_include_scaffolding!'s new path base Co-Authored-By: Claude Opus 5.5 --- uniffi/MIGRATE.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uniffi/MIGRATE.md b/uniffi/MIGRATE.md index 5d410f7a1..ee93e9f06 100644 --- a/uniffi/MIGRATE.md +++ b/uniffi/MIGRATE.md @@ -2,6 +2,9 @@ ## Unreleased +- `uniffi_macros`: `generate_and_include_scaffolding!` (the `trybuild` feature) resolves a + relative path from the calling file, as `include_str!` does, not from rustc's working directory. + A trybuild case at `tests/ui/x.rs` names `src/x.udl` as `../../src/x.udl`. - `uniffi_bindgen`: a name no longer identifies a type across crates. `ComponentInterface::is_name_used_as_error(name)` is now `is_used_as_error(&ty)`, `ComponentInterface::get_type(name)` finds only the crate's own types, and From a6755ceb275046f9c39e1de1f19ed55cb9e1fa5c Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Mon, 2 Nov 2026 07:01:14 -0800 Subject: [PATCH 6/9] chore(quest): hold the warm gate on jdx/mr-boxington#896, then mbxCheck on the host Co-Authored-By: Claude Opus 5.5 --- quest/m0/checks/cache.md | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/quest/m0/checks/cache.md b/quest/m0/checks/cache.md index 8ed78786b..9e276c9b5 100644 --- a/quest/m0/checks/cache.md +++ b/quest/m0/checks/cache.md @@ -13,14 +13,29 @@ gate has. PR code can write to it, a risk moq already accepts; mbx keys each com its compiler, target, and inputs. Local worktrees share it too, where the dev shell already can. -The dev shell already puts mbx's Cargo shim ahead of its toolchains wherever `mbx setup` -installed one. What remains is the host: kixelated/nixos's `rust2` land instance mounts and -configures an mbx cache, as its `moq-pro` instance does with `mbxCheck`. Check it by -reading a gate run's log for mbx's cache summary. - -Through mbx 1.29.1, `uniffi_uitests` fails: the diagnostics of rustc runs that trybuild's -nested cargo starts through mbx's wrapper keep the `${target}` placeholder mbx stores paths -under, so trybuild cannot match its snapshots. `MBX_DISABLE=1` passes. Get it fixed in mbx -(jdx/mr-boxington), or decide with the maintainer to keep that test off mbx meanwhile. +The dev shell puts mbx's Cargo shim ahead of its toolchains wherever `mbx setup` installed +one. mbx must first print real paths in diagnostics: through 1.29.1, an error in a build +script's `OUT_DIR` names the file by mbx's placeholder (`${out_dir}`, `${target}`), which +fails `uniffi_uitests`'s trybuild snapshots +([jdx/mr-boxington#896](https://github.com/jdx/mr-boxington/issues/896)). Decided with the +maintainer on 2026-11-02: wait for the upstream fix rather than keep that test off mbx. + +Once a release fixes it, kixelated/nixos's `quest-land` module moves its mbx pin to that +release (the version in `packages/mbx.nix` and `mbxCheck`'s `prepare` stamp), and the `rust2` +land instance takes moq-pro's profile (maintainer, 2026-11-02): + +```nix +rust2 = mbxCheck // { + id = 9; + enable = lib.mkDefault false; + # check.yml's Check runs the same recipe; it needs no base. + command = "just ci"; + cpuQuota = 800; + memoryHigh = "8G"; + memorySwapMax = "1G"; +}; +``` + +Check it by reading a gate run's log for mbx's cache summary. Public API: none. From 3d0cabcdf4ec8b21ad5e6a077a7bcd66bdd97b3c Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Wed, 4 Nov 2026 03:05:49 -0800 Subject: [PATCH 7/9] chore(quest): mbx 1.29.2 fixes the uitests snapshots; the host change remains Co-Authored-By: Claude Opus 5.5 --- quest/m0/checks/cache.md | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/quest/m0/checks/cache.md b/quest/m0/checks/cache.md index 9e276c9b5..c28ec4a1d 100644 --- a/quest/m0/checks/cache.md +++ b/quest/m0/checks/cache.md @@ -14,27 +14,13 @@ its compiler, target, and inputs. Local worktrees share it too, where the dev sh can. The dev shell puts mbx's Cargo shim ahead of its toolchains wherever `mbx setup` installed -one. mbx must first print real paths in diagnostics: through 1.29.1, an error in a build -script's `OUT_DIR` names the file by mbx's placeholder (`${out_dir}`, `${target}`), which -fails `uniffi_uitests`'s trybuild snapshots -([jdx/mr-boxington#896](https://github.com/jdx/mr-boxington/issues/896)). Decided with the -maintainer on 2026-11-02: wait for the upstream fix rather than keep that test off mbx. - -Once a release fixes it, kixelated/nixos's `quest-land` module moves its mbx pin to that -release (the version in `packages/mbx.nix` and `mbxCheck`'s `prepare` stamp), and the `rust2` -land instance takes moq-pro's profile (maintainer, 2026-11-02): - -```nix -rust2 = mbxCheck // { - id = 9; - enable = lib.mkDefault false; - # check.yml's Check runs the same recipe; it needs no base. - command = "just ci"; - cpuQuota = 800; - memoryHigh = "8G"; - memorySwapMax = "1G"; -}; -``` +one. That needs mbx 1.29.2 or later: older releases name a file in a build script's `OUT_DIR` +by mbx's placeholder in compile errors, which fails `uniffi_uitests`' trybuild snapshots +([jdx/mr-boxington#896](https://github.com/jdx/mr-boxington/issues/896)). + +What remains is on the host: its mbx pin moves to 1.29.2 or later, and rust2's land instance +takes a per-repository mbx profile, as moq's has (maintainer, 2026-11-02). +[#426](https://github.com/moq-dev/rust2/pull/426)'s `## Host changes` lists both. Check it by reading a gate run's log for mbx's cache summary. From dafb4879b79baf28e00390697ea0da2f3b800c19 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Wed, 4 Nov 2026 03:09:46 -0800 Subject: [PATCH 8/9] chore(go): keep mbx's Cargo shim ahead of the nightly Co-Authored-By: Claude Opus 5.5 --- go/justfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/justfile b/go/justfile index c790b78c5..16a5c9ed4 100644 --- a/go/justfile +++ b/go/justfile @@ -6,7 +6,9 @@ set shell := ["bash", "-euo", "pipefail", "-c"] -export PATH := if env("RUST2_TS_TOOLCHAIN", "") == "" { env("PATH") } else { env("RUST2_TS_TOOLCHAIN") / "bin:" + env("PATH") } +# mbx's Cargo shim, which the dev shell exports, stays ahead of the nightly so cargo still builds through it. +cargo_shim := if env("RUST2_CARGO_SHIM", "") == "" { "" } else { env("RUST2_CARGO_SHIM") + ":" } +export PATH := if env("RUST2_TS_TOOLCHAIN", "") == "" { env("PATH") } else { cargo_shim + env("RUST2_TS_TOOLCHAIN") / "bin:" + env("PATH") } default: @just --list From 7ad403ed02877c2bfc64809a4b2a454a326117ed Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Mon, 9 Nov 2026 07:48:20 -0800 Subject: [PATCH 9/9] quest: list the host steps the cache quest still waits on The quest named no remaining work once the code landed; its Waiting section now gives the three host steps, each with how to check it. Co-Authored-By: Claude Haiku 5.5 --- quest/m0/checks/cache.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/quest/m0/checks/cache.md b/quest/m0/checks/cache.md index c28ec4a1d..59787dc88 100644 --- a/quest/m0/checks/cache.md +++ b/quest/m0/checks/cache.md @@ -1,4 +1,4 @@ -# [XS] A warm gate +# [S] A warm gate ## Goal @@ -13,15 +13,12 @@ gate has. PR code can write to it, a risk moq already accepts; mbx keys each com its compiler, target, and inputs. Local worktrees share it too, where the dev shell already can. -The dev shell puts mbx's Cargo shim ahead of its toolchains wherever `mbx setup` installed -one. That needs mbx 1.29.2 or later: older releases name a file in a build script's `OUT_DIR` -by mbx's placeholder in compile errors, which fails `uniffi_uitests`' trybuild snapshots -([jdx/mr-boxington#896](https://github.com/jdx/mr-boxington/issues/896)). +Public API: `uniffi_macros`' `generate_and_include_scaffolding!` with the `trybuild` feature +resolves a relative path from the calling file, not from rustc's working directory. This is +breaking and has no `MIGRATE.md` entry yet. -What remains is on the host: its mbx pin moves to 1.29.2 or later, and rust2's land instance -takes a per-repository mbx profile, as moq's has (maintainer, 2026-11-02). -[#426](https://github.com/moq-dev/rust2/pull/426)'s `## Host changes` lists both. +## Waiting -Check it by reading a gate run's log for mbx's cache summary. - -Public API: none. +- Maintainer: move the land host's mbx pin from 1.28.0 to 1.29.2 or later, then rerun `mbx setup` wherever a shim exists, since a shim runs the mbx its `mbx-target` file names. Check: `mbx --version` on the land host prints 1.29.2 or later, and the shim's `mbx-target` names that store path. 1.28.0 prints no real paths for files in a build script's `OUT_DIR` ([jdx/mr-boxington#896](https://github.com/jdx/mr-boxington/issues/896)). +- Maintainer: give rust2's land instance moq's per-repository mbx profile, `id = 9`, `command = "just ci"`, `cpuQuota = 800`, `memoryHigh = "8G"`, `memorySwapMax = "1G"`, with `enable = lib.mkDefault false` until the next item. Check: the host config's `rust2` entry has these values. +- Maintainer: enable that profile once [#426](https://github.com/moq-dev/rust2/pull/426) has merged. Check: a gate run's log shows `mbx[cache]: object cache: ...`.