Avoid forking on version in non-universal resolutions (#10274)

## Summary

Closes https://github.com/astral-sh/uv/issues/10275.
This commit is contained in:
Charlie Marsh 2025-01-02 11:40:48 -05:00 committed by GitHub
parent a3307d91a3
commit 2eba52f674
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -1328,6 +1328,11 @@ impl<InstalledPackages: InstalledPackagesProvider> ResolverState<InstalledPackag
pins: &mut FilePins,
request_sink: &Sender<Request>,
) -> Result<Option<ResolverVersion>, ResolveError> {
// This only applies to universal resolutions.
if env.marker_environment().is_some() {
return Ok(None);
}
// For now, we only apply this to local versions.
if !candidate.version().is_local() {
return Ok(None);