feat: add support for prefixed latest version queries in outdated checks#9767
Conversation
There was a problem hiding this comment.
Code Review
This pull request enhances the mise outdated command to better handle tool versions with prefixes, such as specific Java distributions. It introduces the prefixed_latest_query utility to extract the major version segment from a prefixed version string, ensuring that version updates are constrained to the appropriate prefix. The changes include comprehensive unit and E2E tests to validate this behavior. I have no feedback to provide.
Greptile SummaryThis PR fixes
Confidence Score: 5/5Safe to merge — the core logic change is small, well-guarded, and thoroughly unit-tested; the only gap is a missing teardown in the new e2e test. The e2e/cli/test_outdated_slow — missing teardown leaves a Java installation behind after the test runs. Important Files Changed
Reviews (3): Last reviewed commit: "feat: add support for prefixed latest ve..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
Updates mise outdated latest-version resolution so vendor-prefixed versions (e.g., temurin-17.0.0+35) query for the latest within the requested major (temurin-17…) instead of returning the absolute latest for the vendor prefix (temurin-26…). This fits into the toolset/outdated reporting path by improving how OutdatedInfo chooses the backend “latest” query in --inactive/--bump scenarios.
Changes:
- Build a more specific backend latest-version query for prefixed versions by combining the vendor prefix with the first parsed version chunk (typically major).
- Add unit tests covering the new prefixed-query helper.
- Add an e2e assertion validating prefixed latest behavior for Java
--inactiveoutput.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/toolset/outdated_info.rs | Adds prefixed_latest_query and uses it when resolving backend “latest” for bumps/inactive-unknown tools. |
| e2e/cli/test_outdated | Adds an e2e check intended to validate prefixed latest-version behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
18dd47c to
b207247
Compare
b207247 to
bbb5147
Compare
### 🚀 Features - **(cli)** add minimum release age flag to lock and ls-remote by @risu729 in [#9269](#9269) - **(config)** add run field for hooks by @risu729 in [#9718](#9718) - **(github)** add native oauth token source by @jdx in [#9654](#9654) - **(oci)** scope build to project config by default by @jdx in [#9766](#9766) - add support for prefixed latest version queries in outdated checks by @roele in [#9767](#9767) ### 🐛 Bug Fixes - **(activate)** guard bash chpwd hook under nounset by @risu729 in [#9716](#9716) - **(backend)** date-check latest stable fast path by @risu729 in [#9650](#9650) - **(config)** parse core tool options consistently by @risu729 in [#9742](#9742) - **(exec)** propagate __MISE_DIFF so nested mise recovers pristine PATH by @jdx in [#9765](#9765) - **(forgejo)** include prereleases when opted in by @risu729 in [#9717](#9717) - **(github)** avoid caching empty release assets by @risu729 in [#9616](#9616) - **(java)** resolve lockfile URLs from metadata by @risu729 in [#9719](#9719) - **(lock)** cache unavailable github attestations by @risu729 in [#9741](#9741) - **(pipx)** preserve options when reinstalling tools by @risu729 in [#9663](#9663) - **(python)** skip redundant lockfile provenance verification by @risu729 in [#9739](#9739) - **(vfox)** run pre_uninstall hook by @risu729 in [#9662](#9662) ### 🚜 Refactor - **(schema)** extract tool options definition by @risu729 in [#9649](#9649) ### ⚡ Performance - **(aqua)** bake rkyv aqua package blobs by @risu729 in [#9535](#9535) ### 📦️ Dependency Updates - lock file maintenance by @renovate[bot] in [#9773](#9773) ### 📦 Registry - add vector ([github:vectordotdev/vector](https://github.com/vectordotdev/vector)) by @kquinsland in [#9761](#9761) - add oc and openshift-install (http backend) by @konono in [#9669](#9669) ### New Contributors - @konono made their first contribution in [#9669](#9669) - @kquinsland made their first contribution in [#9761](#9761)
The prefix handling in
outdatedcurrently only uses the prefix for querying, which leads to wrong latest version shown. You likely want the latest requested version shown for exampletemurin-17.0.0+35->temurin-17.0.19+10instead oftemurin-26.0.1+8.