Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/cli/doctor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ impl Doctor {
let tools = ts
.list_current_versions()
.into_iter()
.filter(|(_, tv)| tv.request.is_os_supported())
.map(|(f, tv)| match f.is_version_installed(&config, &tv, true) {
true => (tv.to_string(), style::nstyle("")),
false => {
Expand Down
8 changes: 2 additions & 6 deletions src/toolset/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,7 @@ impl Toolset {
measure!("toolset::list_missing_versions", {
self.list_current_versions()
.into_iter()
.filter(|(p, tv)| {
tv.request.is_os_supported() && !p.is_version_installed(config, tv, true)
})
.filter(|(p, tv)| !p.is_version_installed(config, tv, true))
.map(|(_, tv)| tv)
.collect()
})
Expand Down Expand Up @@ -610,7 +608,7 @@ impl Toolset {
self.list_versions_by_plugin()
.iter()
.flat_map(|(p, v)| {
v.iter().map(|v| {
v.iter().filter(|v| v.request.is_os_supported()).map(|v| {

Copilot AI Dec 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding OS filtering here in list_versions_by_plugin() appears to be a compensation for the OS filtering that was removed from list_outdated_versions_filtered(). This suggests that list_versions_by_plugin() might be called from contexts other than list_current_versions(). Consider whether list_versions_by_plugin() should consistently return OS-filtered results, or if this filtering belongs at the call site. This could lead to confusion about which method is responsible for OS filtering.

Copilot uses AI. Check for mistakes.
// map cargo backend specific prefixes to ref
let tv = match v.version.split_once(':') {
Some((ref_type @ ("tag" | "branch" | "rev"), r)) => {
Expand Down Expand Up @@ -672,8 +670,6 @@ impl Toolset {
let versions = self
.list_current_versions()
.into_iter()
// Respect per-tool os constraints set via options.os
.filter(|(_, tv)| tv.request.is_os_supported())
// Filter to only check specified tools if provided
.filter(|(_, tv)| {
if let Some(tools) = filter_tools {
Expand Down
Loading