From 57a50938c87e083d463b1f50a930707177ff3b97 Mon Sep 17 00:00:00 2001 From: speak-agent <248744407+speak-agent@users.noreply.github.com> Date: Fri, 4 Sep 2026 20:00:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E6=9D=BF=E7=BA=A7=E5=8C=85:?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8=E4=B8=8D=E5=86=8D=E6=98=AF=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E6=9C=9F=E7=9A=84=E8=BE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit THE TIER WAS CORRECT AND BOUGHT NOTHING, AND ONLY A SANDBOX COULD SHOW THAT. `riscv-virt-rt@0.7.1` and `aarch64-virt-rt@0.2.1` moved their emulator onto the `run` tier, and both repositories assert it in their own CI: a build names the emulator zero times, a run names it. Both pass. They pass because a repository testing itself builds from its WORKING TREE, where no package install happens. A consumer installs the package, and this descriptor's platform `deps` is materialised at that moment — so a fresh sandbox running exactly the asserted build still downloaded 33 MB of emulator, through this line rather than through the tier. Measured: `Downloading xim:qemu-riscv@9.2.4-1 … 33.1 MB` inside a build that had already been proved not to ask for it. The emulator is removed from `deps` on both boards. riscv keeps `xim:picolibc-riscv`, which is a different case and a documented one: the C library IS needed to build, and removing it was a regression that took five versions to surface. OLDER VERSIONS KEEP WORKING, which is why this is safe to do at the platform level where `deps` applies to every version. 0.7.0 and 0.2.0 declare their emulator in an untiered `[xlings.workspace]` entry, which means `Always` — so it arrives when they build rather than when they install. --- pkgs/a/aarch64-virt-rt.lua | 21 ++++++++++++++++++--- pkgs/r/riscv-virt-rt.lua | 24 +++++++++++++++++++++--- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/pkgs/a/aarch64-virt-rt.lua b/pkgs/a/aarch64-virt-rt.lua index ade307e..76e7bae 100644 --- a/pkgs/a/aarch64-virt-rt.lua +++ b/pkgs/a/aarch64-virt-rt.lua @@ -44,6 +44,24 @@ -- `ldflag`, not as a directive one board needs and the other cannot express. -- The board-package interface is therefore complete, and "board package" and -- "C library provider" are separable roles. +-- THE EMULATOR IS NO LONGER AN INSTALL-TIME EDGE, BECAUSE THE PACKAGE NOW SAYS +-- WHEN IT IS NEEDED. +-- +-- `deps` here is materialised when the PACKAGE is installed, so it fetched the +-- emulator for anyone who added this board — including a CI job that compiles +-- firmware and never runs it. From 0.7.1 the package declares the emulator in +-- `[xlings.workspace]` with `when = "run"`, which provisions it for the verbs +-- that execute an artefact and no others. +-- +-- MEASURED, AND ONLY A SANDBOX COULD MEASURE IT. Both board repositories assert +-- the tier in their own CI and both pass, because a repository testing itself +-- builds from its working tree where no package install happens. In a fresh +-- sandbox the same build downloaded 33 MB of emulator anyway — through this +-- line. The tier was correct and bought nothing. +-- +-- Older versions keep working: their `[xlings.workspace]` entry is untiered, +-- which means `Always`, so the emulator arrives when they build rather than +-- when they install. package = { spec = "1", namespace = "mcpplibs", @@ -55,7 +73,6 @@ package = { xpm = { linux = { - deps = { "xim:qemu-arm@9.2.4-1" }, ["0.2.1"] = { url = { GLOBAL = "https://github.com/mcpplibs/aarch64-virt-rt/archive/refs/tags/0.2.1.tar.gz", @@ -86,7 +103,6 @@ package = { }, }, macosx = { - deps = { "xim:qemu-arm@9.2.4-1" }, ["0.2.1"] = { url = { GLOBAL = "https://github.com/mcpplibs/aarch64-virt-rt/archive/refs/tags/0.2.1.tar.gz", @@ -117,7 +133,6 @@ package = { }, }, windows = { - deps = { "xim:qemu-arm@9.2.4-1" }, ["0.2.1"] = { url = { GLOBAL = "https://github.com/mcpplibs/aarch64-virt-rt/archive/refs/tags/0.2.1.tar.gz", diff --git a/pkgs/r/riscv-virt-rt.lua b/pkgs/r/riscv-virt-rt.lua index 30d3574..2b00b8c 100644 --- a/pkgs/r/riscv-virt-rt.lua +++ b/pkgs/r/riscv-virt-rt.lua @@ -48,6 +48,24 @@ -- mcpp 2026.8.20.2+) and stops treating an absent C library as an error, while -- still supplying the emulator. 0.4.0 stays listed; its default template is -- unaffected. +-- THE EMULATOR IS NO LONGER AN INSTALL-TIME EDGE, BECAUSE THE PACKAGE NOW SAYS +-- WHEN IT IS NEEDED. +-- +-- `deps` here is materialised when the PACKAGE is installed, so it fetched the +-- emulator for anyone who added this board — including a CI job that compiles +-- firmware and never runs it. From 0.7.1 the package declares the emulator in +-- `[xlings.workspace]` with `when = "run"`, which provisions it for the verbs +-- that execute an artefact and no others. +-- +-- MEASURED, AND ONLY A SANDBOX COULD MEASURE IT. Both board repositories assert +-- the tier in their own CI and both pass, because a repository testing itself +-- builds from its working tree where no package install happens. In a fresh +-- sandbox the same build downloaded 33 MB of emulator anyway — through this +-- line. The tier was correct and bought nothing. +-- +-- Older versions keep working: their `[xlings.workspace]` entry is untiered, +-- which means `Always`, so the emulator arrives when they build rather than +-- when they install. package = { spec = "1", namespace = "mcpplibs", @@ -90,7 +108,7 @@ package = { }, sha256 = "a0c59deff6b40061637f452c8eafb17cfcb1a7a23f8da4a79050db352e27b064", }, - deps = { "xim:picolibc-riscv@1.8.12", "xim:qemu-riscv@9.2.4-1" }, + deps = { "xim:picolibc-riscv@1.8.12" }, ["0.1.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.1.0.tar.gz", @@ -170,7 +188,7 @@ package = { }, sha256 = "a0c59deff6b40061637f452c8eafb17cfcb1a7a23f8da4a79050db352e27b064", }, - deps = { "xim:picolibc-riscv@1.8.12", "xim:qemu-riscv@9.2.4-1" }, + deps = { "xim:picolibc-riscv@1.8.12" }, ["0.1.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.1.0.tar.gz", @@ -250,7 +268,7 @@ package = { }, sha256 = "a0c59deff6b40061637f452c8eafb17cfcb1a7a23f8da4a79050db352e27b064", }, - deps = { "xim:picolibc-riscv@1.8.12", "xim:qemu-riscv@9.2.4-1" }, + deps = { "xim:picolibc-riscv@1.8.12" }, ["0.1.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.1.0.tar.gz",