feat: support os/arch compound syntax in tool os filtering#9088
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for filtering tools based on specific OS and architecture combinations using an os/arch syntax. The changes include updated documentation, a new end-to-end test suite, and logic within the toolset to normalize OS and architecture aliases (e.g., mapping 'darwin' to 'macos' and 'x86_64' to 'x64'). A review comment suggests documenting the 'win' alias for Windows to ensure the documentation remains consistent with the implementation.
Greptile SummaryThis PR adds Confidence Score: 5/5Safe to merge; implementation is correct and well-tested with only a minor test-reliability concern. No P0 or P1 findings. The normalization logic is consistent with the existing e2e/tools/test_os_arch_filter line 12 — the Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["is_os_supported()"] --> B{os field set?}
B -- No --> Z["delegate to ba().is_os_supported()"]
B -- Yes --> C["for each entry in os_list"]
C --> D{entry contains '/'}
D -- Yes --> E["split into os_part / arch_part"]
E --> F["normalize_os(os_part) == current_os"]
F -- match --> G["normalize_arch(arch_part) == current_arch"]
G -- match --> H["matched = true"]
D -- No --> I["normalize_os(entry) == current_os"]
I -- match --> H
G -- no match --> C
F -- no match --> C
I -- no match --> C
H --> J{matched?}
J -- Yes --> Z
J -- No --> K["return false (skip tool)"]
Reviews (3): Last reviewed commit: "feat: support os/arch compound syntax in..." | Re-trigger Greptile |
2b5e7bc to
08f26b4
Compare
Allow entries in the `os` field to specify both OS and architecture using a slash separator (e.g., `"macos/arm64"`, `"linux/x64"`). When an entry contains `/`, both the OS and architecture must match the current platform. Plain OS entries (e.g., `"linux"`) continue to match any architecture on that OS. OS aliases (`darwin` -> `macos`) and arch aliases (`aarch64` -> `arm64`, `x86_64`/`amd64` -> `x64`) are normalized automatically. Example: `os = ["linux", "macos/arm64"]` installs on all Linux machines and on Apple Silicon Macs, but skips Intel Macs.
08f26b4 to
7063b5a
Compare
### 🚀 Features - **(npm)** use --min-release-age for npm 11.10.0+ supply chain protection by @webkaz in [#9072](#9072) - **(registry)** add openfga by @mnm364 in [#9084](#9084) - **(task)** allow to set confirmation default by @roele in [#9089](#9089) - support os/arch compound syntax in tool os filtering by @RobertDeRose in [#9088](#9088) ### 🐛 Bug Fixes - **(activate)** export __MISE_EXE and resolve bare ARGV0 to absolute path by @fru1tworld in [#9081](#9081) - **(install)** support aliased installs sharing a backend by @jdx in [#9093](#9093) - **(shim)** use which_no_shims when resolving mise binary in reshim and doctor by @kevinswiber in [#9071](#9071) - filter empty segments in colon-separated env var parsing by @baby-joel in [#9076](#9076) ### 📚 Documentation - fix wrong file reference to forgejo backend implemenation by @roele in [#9090](#9090) - fix cli token command for token resolution by @roele in [#9077](#9077) ### 📦 Registry - add trzsz-go ([aqua:trzsz/trzsz-go](https://github.com/trzsz/trzsz-go)) by @ZeroAurora in [#9083](#9083) - add copilot ([aqua:github/copilot-cli](https://github.com/github/copilot-cli)) by @risu729 in [#9082](#9082) ### Chore - add AGENTS.md symlink by @jdx in [#9094](#9094) ### New Contributors - @kevinswiber made their first contribution in [#9071](#9071) - @webkaz made their first contribution in [#9072](#9072) - @RobertDeRose made their first contribution in [#9088](#9088) ## 📦 Aqua Registry Updates #### New Packages (7) - [`IBM-Cloud/ibm-cloud-cli-release`](https://github.com/IBM-Cloud/ibm-cloud-cli-release) - [`max-sixty/worktrunk`](https://github.com/max-sixty/worktrunk) - [`micelio.dev/hif`](https://github.com/micelio.dev/hif) - [`pgplex/pgschema`](https://github.com/pgplex/pgschema) - [`rose-pine/rose-pine-bloom`](https://github.com/rose-pine/rose-pine-bloom) - [`santosr2/TerraTidy`](https://github.com/santosr2/TerraTidy) - [`trzsz/trzsz-go`](https://github.com/trzsz/trzsz-go) #### Updated Packages (3) - [`mvdan/sh`](https://github.com/mvdan/sh) - [`rvben/rumdl`](https://github.com/rvben/rumdl) - [`temporalio/temporal`](https://github.com/temporalio/temporal)
## [2026.4.14](https://github.com/jdx/mise/compare/v2026.4.13..v2026.4.14) - 2026-04-15 ### Chore - bump sigstore-verification by @jdx in [#9128](jdx/mise#9128) ## [2026.4.13](https://github.com/jdx/mise/compare/v2026.4.12..v2026.4.13) - 2026-04-15 ### 🐛 Bug Fixes - **(go)** honor install_before for module versions by @mariusvniekerk in [#9097](jdx/mise#9097) - **(vfox-plugin)** support Git URL with commit hash for mise.toml by @Oyami-Srk in [#9099](jdx/mise#9099) - `MISE_FETCH_REMOTE_VERSIONS_CACHE` not respected by @mcncl in [#9096](jdx/mise#9096) ### 📦️ Dependency Updates - unblock cargo-deny advisories check by @jdx in [#9112](jdx/mise#9112) ### New Contributors - @mariusvniekerk made their first contribution in [#9097](jdx/mise#9097) - @mcncl made their first contribution in [#9096](jdx/mise#9096) - @Oyami-Srk made their first contribution in [#9099](jdx/mise#9099) ## [2026.4.12](https://github.com/jdx/mise/compare/v2026.4.11..v2026.4.12) - 2026-04-15 ### 🚀 Features - **(npm)** use --min-release-age for npm 11.10.0+ supply chain protection by @webkaz in [#9072](jdx/mise#9072) - **(registry)** add openfga by @mnm364 in [#9084](jdx/mise#9084) - **(task)** allow to set confirmation default by @roele in [#9089](jdx/mise#9089) - support os/arch compound syntax in tool os filtering by @RobertDeRose in [#9088](jdx/mise#9088) ### 🐛 Bug Fixes - **(activate)** export __MISE_EXE and resolve bare ARGV0 to absolute path by @fru1tworld in [#9081](jdx/mise#9081) - **(install)** support aliased installs sharing a backend by @jdx in [#9093](jdx/mise#9093) - **(shim)** use which_no_shims when resolving mise binary in reshim and doctor by @kevinswiber in [#9071](jdx/mise#9071) - filter empty segments in colon-separated env var parsing by @baby-joel in [#9076](jdx/mise#9076) ### 📚 Documentation - fix wrong file reference to forgejo backend implemenation by @roele in [#9090](jdx/mise#9090) - fix cli token command for token resolution by @roele in [#9077](jdx/mise#9077)
Allow entries in the
osfield to specify both OS and architecture using a slash separator (e.g.,"macos/arm64","linux/x64").When an entry contains
/, both the OS and architecture must match the current platform. Plain OS entries (e.g.,"linux") continue to match any architecture on that OS.OS aliases (
darwin->macos) and arch aliases (aarch64->arm64,x86_64/amd64->x64) are normalized automatically.Example:
os = ["linux", "macos/arm64"]installs on all Linux machines and on Apple Silicon Macs, but skips Intel Macs.