feat: add --inactive option to outdated and upgrade commands for inactive tools#9640
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a --no-source flag to the outdated and upgrade commands, allowing users to manage installed tools even if they are not currently active in the configuration. The changes include updates to the CLI arguments, the toolset resolution logic, and the addition of end-to-end tests. Feedback suggests refactoring a redundant match block in outdated_info.rs using the ba() method for better readability and improving error handling in mod.rs by logging warnings instead of silently defaulting on version discovery failures.
Greptile SummaryAdds a
Confidence Score: 4/5The upgrade path is correct, but the outdated command still drops the tool-name filter for inactive entries, a gap carried over from earlier review rounds. The src/cli/outdated.rs — the tool-name filter is not forwarded when Important Files Changed
Reviews (9): Last reviewed commit: "[autofix.ci] apply automated fixes" | Re-trigger Greptile |
743e34d to
caad380
Compare
There was a problem hiding this comment.
Pull request overview
Adds a --no-source flag to mise outdated and mise upgrade so they can include/operate on tools that are installed but no longer have a config source (i.e., inactive/not present in the current config), and updates generated/help documentation and completion metadata accordingly.
Changes:
- Add
--no-sourceflag wiring foroutdatedandupgrade, plus completion/usage/man/doc updates. - Extend outdated/upgrade internals to include installed-but-inactive tool versions and resolve “latest” appropriately for
ToolSource::Unknown. - Add e2e coverage for showing/upgrading an installed tool after removing it from config.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| xtasks/fig/src/mise.ts | Adds --no-source to Fig completion specs for outdated and upgrade. |
| src/toolset/tool_version.rs | Extends ResolveOptions with no_source and threads it through latest-version lookup options. |
| src/toolset/outdated_info.rs | Adjusts latest-version resolution and upgrade request construction for installed-but-inactive tools under --no-source. |
| src/toolset/mod.rs | Switches outdated listing to include installed versions when no_source is set. |
| src/cli/use.rs | Updates ResolveOptions initialization to include the new no_source field; minor help formatting tweak. |
| src/cli/upgrade.rs | Adds --no-source flag and passes it into resolution/install options. |
| src/cli/outdated.rs | Adds --no-source flag and passes it into outdated listing options. |
| src/cli/install.rs | Updates ResolveOptions initialization to include the new no_source field. |
| mise.usage.kdl | Adds --no-source to usage spec for outdated and upgrade (feeds generated docs/man). |
| man/man1/mise.1 | Documents --no-source in the man page for outdated and upgrade. |
| e2e/cli/test_upgrade | Adds e2e test ensuring mise upgrade <tool> --no-source upgrades an installed-but-inactive tool. |
| e2e/cli/test_outdated | Adds e2e test ensuring mise outdated --no-source shows an installed-but-inactive tool. |
| docs/cli/use.md | Minor markdown formatting adjustment in examples section. |
| docs/cli/upgrade.md | Documents --no-source in generated CLI docs for upgrade. |
| docs/cli/outdated.md | Documents --no-source in generated CLI docs for outdated. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
be8938b to
a6db3e4
Compare
457bbd1 to
54ddc85
Compare
cc9cd55 to
f05457f
Compare
### 🚀 Features - add --inactive option to outdated and upgrade commands for inactive tools by @roele in [#9640](#9640) ### 🐛 Bug Fixes - **(aqua)** resolve bin paths for prefixed v tags by @risu729 in [#9759](#9759) - **(bun)** create bunx alongside bun.exe on Windows install by @JamBalaya56562 in [#9732](#9732) - **(dotnet)** use shared prerelease tool option by @risu729 in [#9720](#9720) - **(node)** use matching node in npm shim by @jdx in [#9749](#9749) - **(task)** resolve bash deterministically on Windows to avoid WSL launcher by @JamBalaya56562 in [#9750](#9750) ### 📚 Documentation - **(secrets)** clarify age strict mode default by @risu729 in [#9737](#9737) - **(tasks)** add bash shebang to conditional-dependencies example by @JamBalaya56562 in [#9747](#9747) - update backend tool option docs by @risu729 in [#9738](#9738) ### 📦 Registry - remove tools with zero users by @jdx in [#9725](#9725) - add scalafmt ([github:scalameta/scalafmt](https://github.com/scalameta/scalafmt)) by @pokir in [#9757](#9757) - remove flarectl by @risu729 in [#9756](#9756) ### Chore - **(release)** strip pre-existing sponsor block before appending canonical one by @jdx in [#9745](#9745) ### New Contributors - @pokir made their first contribution in [#9757](#9757)
Adds a new
--inactiveflag tooutdatedandupgradecommand to allow to show/upgrade tools which are currently not active or defined in a configuration.