[WIP] Add --before flag for date-based version filtering#7300
Merged
jdx merged 3 commits intoinstall-before-featurefrom Dec 14, 2025
Merged
[WIP] Add --before flag for date-based version filtering#7300jdx merged 3 commits intoinstall-before-featurefrom
jdx merged 3 commits intoinstall-before-featurefrom
Conversation
4 tasks
Pass ResolveOptions with before_date to list_outdated_versions so the dry-run output matches what would actually be installed. Previously, dry-run showed the unfiltered latest version while the actual upgrade would apply the before-date filter. Co-authored-by: jdx <216188+jdx@users.noreply.github.com>
Add comments explaining why only before_date is preserved from base_opts and clarifying the parameter differences between Backend and ToolVersion methods. Co-authored-by: jdx <216188+jdx@users.noreply.github.com>
Copilot stopped work on behalf of
jdx due to an error
December 14, 2025 23:35
| if regex!(r"(\d+)\.(\d+)\.(\d+)").is_match(&tv.version) { | ||
| let oi = OutdatedInfo::resolve(config, tv.clone(), bump).await?; | ||
| let oi = OutdatedInfo::resolve(config, tv.clone(), bump, &ResolveOptions::default()) | ||
| .await?; |
There was a problem hiding this comment.
Bug: Rust plugin ignores before_date causing duplicate entries
The Rust plugin's outdated_info method calls OutdatedInfo::resolve with ResolveOptions::default(), ignoring the before_date filter. In list_outdated_versions, both t.outdated_info() and OutdatedInfo::resolve() results are added to the outdated list. For Rust with semver versions, this creates duplicate entries - one ignoring before_date and one respecting it - leading to incorrect output when users specify --before.
Additional Locations (1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the ability to filter tool versions by release date, similar to npm's
--beforeflag. This enables reproducible builds and supply-chain security by ensuring only versions released before a certain date are considered.Progress
--beforeCLI flag to install/upgrade/use commandsinstall_beforesetting andMISE_INSTALL_BEFOREenv varinstall_before_modereferenceslatest_version_with_optsto ToolVersion💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Note
Propagates ResolveOptions (incl. before_date) through latest-version resolution and outdated/upgrade flows so date-based filtering applies during checks and upgrades.
ResolveOptionssupport toToolset::list_outdated_versions,OutdatedInfo::resolve, andToolVersion::latest_version_with_opts(preservesbefore_date).latest_version_with_optswhen bumping to honorbefore_date.upgrade: buildResolveOptionswithbefore_date(from--before/settings),latest_versions=true,use_locked_version=false; pass to outdated listing and installInstallOptions.outdated: passResolveOptions::default()to outdated listing.outdated_infonow callsOutdatedInfo::resolvewith defaultResolveOptions.ToolVersion::latest_version_with_optsand updated call sites to apply date-based filtering.Written by Cursor Bugbot for commit ad374ed. This will update automatically on new commits. Configure here.