mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-01 20:31:12 +00:00
Allow conflicting Git URLs that refer to the same commit SHA (#2769)
## Summary This PR leverages our lookahead direct URL resolution to significantly improve the range of Git URLs that we can accept (e.g., if a user provides the same requirement, once as a direct dependency, and once as a tag). We did some of this in #2285, but the solution here is more general and works for arbitrary transitive URLs. Closes https://github.com/astral-sh/uv/issues/2614.
This commit is contained in:
parent
20d4762776
commit
c30a65ee0c
9 changed files with 267 additions and 158 deletions
|
|
@ -96,9 +96,8 @@ impl<'a, Context: BuildContext + Send + Sync> LookaheadResolver<'a, Context> {
|
|||
|
||||
while !queue.is_empty() || !futures.is_empty() {
|
||||
while let Some(requirement) = queue.pop_front() {
|
||||
// Ignore duplicates. If we have conflicting URLs, we'll catch that later.
|
||||
if matches!(requirement.version_or_url, Some(VersionOrUrl::Url(_))) {
|
||||
if seen.insert(requirement.name.clone()) {
|
||||
if seen.insert(requirement.clone()) {
|
||||
futures.push(self.lookahead(requirement));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue