docs: add linux optional packages to aube lock#594
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the aube-lock.yaml file to include platform-specific dependencies for @esbuild and @rollup across various operating systems and architectures. It also introduces a supportedArchitectures configuration in package.json. Feedback suggests that the supportedArchitectures list should be expanded to include arm64 and musl to ensure consistency with the newly added lockfile entries and to support a wider range of environments like ARM-based runners and Alpine Linux.
| "pnpm": { | ||
| "supportedArchitectures": { | ||
| "os": [ | ||
| "current", | ||
| "linux" | ||
| ], | ||
| "cpu": [ | ||
| "current", | ||
| "x64" | ||
| ], | ||
| "libc": [ | ||
| "current", | ||
| "glibc" | ||
| ] | ||
| } | ||
| }, |
There was a problem hiding this comment.
The supportedArchitectures configuration is missing arm64 and musl, which are required to fully support the Linux packages added to the lockfile (such as @esbuild/linux-arm64 and the musl variants of @rollup/rollup). Adding these explicitly ensures that the lockfile remains stable and complete when generated or updated across different development and CI environments, such as Alpine Linux or ARM-based runners.
"pnpm": {
"supportedArchitectures": {
"os": [
"current",
"linux"
],
"cpu": [
"current",
"x64",
"arm64"
],
"libc": [
"current",
"glibc",
"musl"
]
}
},
Greptile SummaryThis PR fixes a CI Pages build failure by adding Confidence Score: 5/5Safe to merge — targeted lockfile fix with no logic changes. The change is narrowly scoped to adding cross-platform architecture support in package.json and regenerating the lockfile. It directly addresses a confirmed CI failure with no risk to application logic. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Developer runs aube install on macOS] --> B{pnpm.supportedArchitectures}
B -- before fix: macOS only --> C[aube-lock.yaml: Darwin packages only]
B -- after fix: macOS + Linux --> D[aube-lock.yaml: Darwin + Linux packages]
C --> E[CI: Linux runner installs deps]
D --> F[CI: Linux runner installs deps]
E --> G["@rollup/rollup-linux-x64-gnu MISSING"]
F --> H["All native packages resolved"]
G --> I[docs:build FAILS]
H --> J[docs:build SUCCEEDS]
Reviews (1): Last reviewed commit: "docs: add linux optional packages to aub..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #594 +/- ##
=======================================
Coverage 79.04% 79.04%
=======================================
Files 48 48
Lines 7235 7235
Branches 7235 7235
=======================================
Hits 5719 5719
Misses 1141 1141
Partials 375 375 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fresh resolves filtered optional native deps by the host's os/cpu/libc before writing the lockfile, so an `aube install` on macOS produced an `aube-lock.yaml` missing `@rollup/rollup-linux-*`, `@esbuild/linux-*`, etc. A subsequent install on Linux CI then failed because the linker had no entry to reach for. Users had to hand-write `pnpm.supportedArchitectures` in `package.json` just to get a portable lockfile (see e.g. jdx/usage#594). The fix: when the project writes `aube-lock.yaml` and the manifest has no explicit `supportedArchitectures`, resolve across darwin / linux / win32 × x64 / arm64 + glibc / musl. `node_modules` still gets the host-only slice — the in-memory graph is trimmed via `filter_graph` after the lockfile write, mirroring the pass that already runs on the lockfile-happy install branch. Foreign lockfile formats (pnpm-lock.yaml, yarn.lock, package-lock.json, bun.lock) keep their current host-only default so aube doesn't silently bake more packages into them than the native tool would have produced. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fresh resolves filtered optional native deps by the host's os/cpu/libc before writing the lockfile, so an `aube install` on macOS produced an `aube-lock.yaml` missing `@rollup/rollup-linux-*`, `@esbuild/linux-*`, etc. A subsequent install on Linux CI then failed because the linker had no entry to reach for. Users had to hand-write `pnpm.supportedArchitectures` in `package.json` just to get a portable lockfile (see e.g. jdx/usage#594). The fix: when the project writes `aube-lock.yaml` and the manifest has no explicit `supportedArchitectures`, resolve across an explicit set of (os, cpu, libc) triples — darwin-arm64, linux × {x64, arm64} × {glibc, musl}, and win32 × {x64, arm64}. darwin-x64 is intentionally out of the baseline: Apple Silicon is the shipping Mac platform and several major native ecosystems (sharp, swc) have already dropped Intel Mac binaries. A user still on an Intel Mac widens with `pnpm.supportedArchitectures.cpu: ["current", "x64"]` as usual. `node_modules` stays host-only: the in-memory graph is trimmed via `filter_graph` after the lockfile write, mirroring the pass that already runs on the lockfile-happy install branch. Foreign lockfile formats (pnpm-lock.yaml, yarn.lock, package-lock.json, bun.lock) keep their current host-only default so aube doesn't silently bake more packages into them than the native tool would have produced. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
## Summary Fixes the cross-platform lockfile footgun reported in [jdx/usage#594](jdx/usage#594): an `aube install` on macOS used to produce an `aube-lock.yaml` missing `@rollup/rollup-linux-*`, `@esbuild/linux-*`, etc., and Linux CI would fail at module-resolve time. The user's workaround was hand-writing a `pnpm.supportedArchitectures` stanza into `package.json`. ## What changes - **Wide default for `aube-lock.yaml`.** When the resolver is about to write `aube-lock.yaml` and the manifest has no explicit `pnpm.supportedArchitectures`, widen the platform filter to an explicit matrix: darwin-arm64, linux × {x64, arm64} × {glibc, musl}, win32 × {x64, arm64}. darwin-x64 is out of the baseline (Intel Macs are end-of-life, and sharp / swc have dropped those binaries) but the host's own triple is always appended, so an Intel Mac (or a freebsd / ppc64 box) still installs its own natives. - **Foreign lockfiles stay host-only.** `pnpm-lock.yaml`, `yarn.lock`, `package-lock.json`, and `bun.lock` keep pnpm's host-only default — aube shouldn't silently bake more packages into them than the native tool would have written. - **Lockfile disabled ≠ "write aube-lock.yaml".** The widening only fires when aube is actually going to write `aube-lock.yaml`. `lockfile=false` skips widening entirely — no wasted resolution for a lockfile that will never exist. - **`node_modules` stays host-only.** An in-memory `filter_graph` pass after the lockfile write trims the wide graph down to host-installable optionals, mirroring the pass that already runs on the lockfile-happy install branch. - **Streaming fetch defers foreign-platform tarballs and catches up after `filter_graph`.** The widened graph would otherwise pull every platform's native tarball into `~/.aube-store/` on a fresh resolve. The streaming coordinator now skips platform-mismatched registry tarballs up front; after `filter_graph` trims optional mismatches, a catch-up pass fetches any survivor whose store index is still missing — which handles the rare required-platform-mismatched case (broken packages that declare `os`/`cpu` without the optional marker) that `filter_graph` doesn't touch. Common-case fresh installs end up fetching only what the host actually links. Local `file:`/`link:` deps carry no platform constraints and always fetch inline. ## Commits 1. `resolver: widen aube-lock.yaml to every common platform` — wide default + post-write filter_graph on the fresh-resolve path. 2. `install: disambiguate target_lockfile_kind when lockfile disabled` — fixes an overloaded `None` so `lockfile=false` doesn't needlessly widen. 3. `install: add host to wide matrix, skip mismatched tarball fetches` — always include the host triple in the default matrix; first attempt at fetch-time skipping. 4. `install: revert fetch-time platform filter — filter_graph only prunes optionals` — withdraws the naive fetch-time filter after Cursor Bugbot flagged that required-platform-mismatched deps would silently break. 5. `install: defer platform-mismatched fetches, catch up after filter_graph` — correct two-phase design: defer in streaming, catch up for survivors. ## Test plan - [x] `cargo test` — all workspace crates (`aube-resolver` gains 2 new tests pinning the matrix shape and the always-include-host guarantee). - [x] `cargo clippy --all-targets -- -D warnings`, `cargo fmt --check`. - [x] `mise run test:bats test/optional_platform.bats` — three new integration tests: - `aube-lock.yaml captures cross-platform optional natives by default` - `pnpm-lock.yaml keeps pnpm's host-only default` - `required platform-mismatched dep still gets fetched and linked` (regression guard for the catch-up pass) - [x] `mise run test:bats` across `install.bats`, `add.bats`, `ignored_optional_dependencies.bats`, `lockfile_settings.bats`, `resolve.bats`, `dedupe.bats` — no regressions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
### 🐛 Bug Fixes - **(zsh)** escape values without descriptions by [@david-hamilton-glean](https://github.com/david-hamilton-glean) in [#597](#597) - use CARGO_BIN_EXE_usage if set by [@kybe236](https://github.com/kybe236) in [#568](#568) ### 📚 Documentation - add releases nav and aube lock by [@jdx](https://github.com/jdx) in [#593](#593) - add linux optional packages to aube lock by [@jdx](https://github.com/jdx) in [#594](#594) ### 📦️ Dependency Updates - pin dtolnay/rust-toolchain action to 631a55b by [@renovate[bot]](https://github.com/renovate[bot]) in [#562](#562) - update codecov/codecov-action digest to 75cd116 by [@renovate[bot]](https://github.com/renovate[bot]) in [#563](#563) - update pnpm/action-setup digest to b906aff by [@renovate[bot]](https://github.com/renovate[bot]) in [#566](#566) - update jdx/mise-action digest to 5228313 by [@renovate[bot]](https://github.com/renovate[bot]) in [#565](#565) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#569](#569) - update dtolnay/rust-toolchain digest to 29eef33 by [@renovate[bot]](https://github.com/renovate[bot]) in [#571](#571) - update swatinem/rust-cache digest to e18b497 by [@renovate[bot]](https://github.com/renovate[bot]) in [#572](#572) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#574](#574) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#575](#575) - update taiki-e/upload-rust-binary-action digest to 10c1cf6 by [@renovate[bot]](https://github.com/renovate[bot]) in [#576](#576) - update rust crate ctor to 0.9 by [@renovate[bot]](https://github.com/renovate[bot]) in [#577](#577) - update actions/configure-pages action to v6 by [@renovate[bot]](https://github.com/renovate[bot]) in [#579](#579) - update rust crate indexmap to v2.14.0 by [@renovate[bot]](https://github.com/renovate[bot]) in [#578](#578) - update codecov/codecov-action action to v6 by [@renovate[bot]](https://github.com/renovate[bot]) in [#581](#581) - update actions/deploy-pages action to v5 by [@renovate[bot]](https://github.com/renovate[bot]) in [#580](#580) - update pnpm/action-setup action to v5 by [@renovate[bot]](https://github.com/renovate[bot]) in [#583](#583) - update jdx/mise-action action to v4 by [@renovate[bot]](https://github.com/renovate[bot]) in [#582](#582) - update pnpm/action-setup action to v6 by [@renovate[bot]](https://github.com/renovate[bot]) in [#584](#584) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#585](#585) - update rust crate clap to v4.6.1 by [@renovate[bot]](https://github.com/renovate[bot]) in [#586](#586) - update rust crate ctor to 0.10 by [@renovate[bot]](https://github.com/renovate[bot]) in [#587](#587) - update actions/upload-pages-artifact action to v5 by [@renovate[bot]](https://github.com/renovate[bot]) in [#588](#588) - update rust crate assert_cmd to v2.2.1 by [@renovate[bot]](https://github.com/renovate[bot]) in [#589](#589) - update taiki-e/upload-rust-binary-action digest to f0d45ae by [@renovate[bot]](https://github.com/renovate[bot]) in [#590](#590) - update dependency eslint to v10.2.1 by [@renovate[bot]](https://github.com/renovate[bot]) in [#591](#591) - update pnpm/action-setup digest to 078e9d4 by [@renovate[bot]](https://github.com/renovate[bot]) in [#592](#592) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#595](#595) ### New Contributors - @david-hamilton-glean made their first contribution in [#597](#597) - @kybe236 made their first contribution in [#568](#568) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [usage](https://github.com/jdx/usage) | patch | `3.2.0` → `3.2.1` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>jdx/usage (usage)</summary> ### [`v3.2.1`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#321---2026-04-22) [Compare Source](jdx/usage@v3.2.0...v3.2.1) ##### 🐛 Bug Fixes - **(zsh)** escape values without descriptions by [@​david-hamilton-glean](https://github.com/david-hamilton-glean) in [#​597](jdx/usage#597) - use CARGO\_BIN\_EXE\_usage if set by [@​kybe236](https://github.com/kybe236) in [#​568](jdx/usage#568) ##### 📚 Documentation - add releases nav and aube lock by [@​jdx](https://github.com/jdx) in [#​593](jdx/usage#593) - add linux optional packages to aube lock by [@​jdx](https://github.com/jdx) in [#​594](jdx/usage#594) ##### 📦️ Dependency Updates - pin dtolnay/rust-toolchain action to [`631a55b`](jdx/usage@631a55b) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​562](jdx/usage#562) - update codecov/codecov-action digest to [`75cd116`](jdx/usage@75cd116) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​563](jdx/usage#563) - update pnpm/action-setup digest to [`b906aff`](jdx/usage@b906aff) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​566](jdx/usage#566) - update jdx/mise-action digest to [`5228313`](jdx/usage@5228313) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​565](jdx/usage#565) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​569](jdx/usage#569) - update dtolnay/rust-toolchain digest to [`29eef33`](jdx/usage@29eef33) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​571](jdx/usage#571) - update swatinem/rust-cache digest to [`e18b497`](jdx/usage@e18b497) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​572](jdx/usage#572) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​574](jdx/usage#574) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​575](jdx/usage#575) - update taiki-e/upload-rust-binary-action digest to [`10c1cf6`](jdx/usage@10c1cf6) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​576](jdx/usage#576) - update rust crate ctor to 0.9 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​577](jdx/usage#577) - update actions/configure-pages action to v6 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​579](jdx/usage#579) - update rust crate indexmap to v2.14.0 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​578](jdx/usage#578) - update codecov/codecov-action action to v6 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​581](jdx/usage#581) - update actions/deploy-pages action to v5 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​580](jdx/usage#580) - update pnpm/action-setup action to v5 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​583](jdx/usage#583) - update jdx/mise-action action to v4 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​582](jdx/usage#582) - update pnpm/action-setup action to v6 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​584](jdx/usage#584) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​585](jdx/usage#585) - update rust crate clap to v4.6.1 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​586](jdx/usage#586) - update rust crate ctor to 0.10 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​587](jdx/usage#587) - update actions/upload-pages-artifact action to v5 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​588](jdx/usage#588) - update rust crate assert\_cmd to v2.2.1 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​589](jdx/usage#589) - update taiki-e/upload-rust-binary-action digest to [`f0d45ae`](jdx/usage@f0d45ae) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​590](jdx/usage#590) - update dependency eslint to v10.2.1 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​591](jdx/usage#591) - update pnpm/action-setup digest to [`078e9d4`](jdx/usage@078e9d4) by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​592](jdx/usage#592) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​595](jdx/usage#595) ##### New Contributors - [@​david-hamilton-glean](https://github.com/david-hamilton-glean) made their first contribution in [#​597](jdx/usage#597) - [@​kybe236](https://github.com/kybe236) made their first contribution in [#​568](jdx/usage#568) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMzYuMiIsInVwZGF0ZWRJblZlciI6IjQzLjEzNi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6cGF0Y2giXX0=-->
Summary
Root cause
The Pages build on main failed during
aube run docs:buildbecause Rollup could not resolve@rollup/rollup-linux-x64-gnu. The lockfile generated on macOS only contained the Darwin Rollup optional package, so the Linux runner installed a graph without Rollup's Linux native package.Validation
mise x aube@latest -- aube install --lockfile-only --forcerm -rf node_modules && mise x node@24 aube@latest -- aube install && mise x node@24 aube@latest -- aube run docs:buildcargo build --all,cargo insta test --accept, generated docs/completions, and Prettier during commitFailing job inspected: https://github.com/jdx/usage/actions/runs/24634632439/job/72027785367
Note
Low Risk
Low risk: changes are limited to pnpm configuration and lockfile updates to ensure platform-specific optional native packages resolve on Linux CI.
Overview
Fixes Linux CI docs builds by teaching pnpm to resolve dependencies for Linux in addition to the current platform via
pnpm.supportedArchitecturesinpackage.json.Refreshes
aube-lock.yamlto include the missing platform-specific optional native packages (notably Rollup and esbuild Linux/Darwin variants) soaube run docs:buildsucceeds on Linux runners.Reviewed by Cursor Bugbot for commit 4c55828. Bugbot is set up for automated code reviews on this repo. Configure here.