- Notifications
You must be signed in to change notification settings - Fork1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Skip repeated directories inPATH
when searching for Python interpreters#12367
base:main
Are you sure you want to change the base?
Conversation
which::which_in_global("python.bat", Some(&dir_clone)) | ||
// If we cannot determine if the directory is unique, we'll assume it is | ||
.unwrap_or(true) | ||
.then(|| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Indented, best viewed withhttps://github.com/astral-sh/uv/pull/12367/files?diff=unified&w=1
@@ -1,6 +1,7 @@ | |||
use itertools::{Either, Itertools}; | |||
use regex::Regex; | |||
use same_file::is_same_file; | |||
use std::collections::HashSet; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Let's default toFxHashSet
.
Should this be implemented by de-duping theinterpreters rather than the parent directories? I assume not, but it'd be good to note why. |
Closes#12302