feat(install): add per-tool install_before option#8842
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces per-tool install_before settings, allowing users to override global configurations for specific tools. It establishes a precedence hierarchy where the CLI --before flag takes priority over per-tool settings, which in turn override global settings. The implementation includes documentation updates, new E2E tests, and a refactor of the resolution logic. A review comment suggests simplifying the before_date resolution logic in src/toolset/tool_request.rs to improve readability and reduce unnecessary cloning.
Greptile SummaryThis PR introduces a per-tool Key changes:
The refactor is clean and the logic is easy to follow. As an implicit side-effect, any caller of Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["ToolRequest::resolve(config, opts)"] --> B{opts.before_date\nis Some?}
B -- Yes --> E["Use opts as-is\n(CLI --before flag wins)"]
B -- No --> C{per-tool\ninstall_before\nin options?}
C -- Yes --> F["Clone opts,\nset before_date\nfrom per-tool value"]
C -- No --> D{global\nSettings::install_before\nis Some?}
D -- Yes --> G["Clone opts,\nset before_date\nfrom global setting"]
D -- No --> H["Use opts as-is\n(no date filter)"]
E --> Z["ToolVersion::resolve(config, self, opts)"]
F --> Z
G --> Z
H --> Z
Reviews (2): Last reviewed commit: "feat(install): add per-tool install_befo..." | Re-trigger Greptile |
Allows overriding the global install_before setting on a per-tool basis: ```toml [tools.trivy] version = "latest" install_before = "1d" ``` Precedence: --before CLI flag > per-tool install_before > global setting. Refs: jdx#8711 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
baae061 to
f2609d0
Compare
### 🚀 Features - **(install)** add per-tool install_before option by @sargunv-headway in [#8842](#8842) ### 🐛 Bug Fixes - **(cli)** respect `-q` flag in `mise prepare` command by @Marukome0743 in [#8792](#8792) - fall back to compile-time musl detection when no system linker found by @davireis in [#8825](#8825) ### 📚 Documentation - fix GitHub capitalization in Alpine docs by @Rohan5commit in [#8844](#8844) ### 📦 Registry - add dbt-fusion ([aqua:getdbt.com/dbt-fusion](https://github.com/getdbt.com/dbt-fusion)) by @ryan-pip in [#8837](#8837) ### New Contributors - @Marukome0743 made their first contribution in [#8792](#8792) - @sargunv-headway made their first contribution in [#8842](#8842) - @Rohan5commit made their first contribution in [#8844](#8844) - @ryan-pip made their first contribution in [#8837](#8837) - @rndmh3ro made their first contribution in [#8839](#8839) ## 📦 Aqua Registry Updates #### New Packages (1) - [`azu/dockerfile-pin`](https://github.com/azu/dockerfile-pin) #### Updated Packages (4) - [`anthropics/claude-code`](https://github.com/anthropics/claude-code) - [`dandavison/delta`](https://github.com/dandavison/delta) - [`goreleaser/goreleaser`](https://github.com/goreleaser/goreleaser) - [`zellij-org/zellij`](https://github.com/zellij-org/zellij)
Adds per-tool
install_beforeoverride as mentioned in #8711.Precedence:
--beforeCLI flag > per-toolinstall_before> globalinstall_beforesetting.Questions for reviewer
install_beforetoEPHEMERAL_OPT_KEYSsince it only affects version resolution, not tool identity. Should it be persisted instead?install_beforefallback from each CLI command intoToolRequest::resolveto support the three-tier precedence. Is there a better place for this?This PR was created with Claude Code.