mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-27 02:17:08 +00:00
Make Directory its own distribution kind (#3519)
## Summary I think this is overall good change because it explicitly encodes (in the type system) something that was previously implicit. I'm not a huge fan of the names here, open to input. It covers some of https://github.com/astral-sh/uv/issues/3506 but I don't think it _closes_ it.
This commit is contained in:
parent
6bbfe555be
commit
42c3bfa351
16 changed files with 434 additions and 163 deletions
|
|
@ -7,10 +7,9 @@ use futures::TryStreamExt;
|
|||
use url::Url;
|
||||
|
||||
use distribution_types::{
|
||||
BuildableSource, HashPolicy, PathSourceUrl, Requirement, SourceUrl, VersionId,
|
||||
BuildableSource, DirectorySourceUrl, HashPolicy, Requirement, SourceUrl, VersionId,
|
||||
};
|
||||
use pep508_rs::RequirementOrigin;
|
||||
|
||||
use uv_distribution::{DistributionDatabase, Reporter};
|
||||
use uv_fs::Simplified;
|
||||
use uv_resolver::{InMemoryIndex, MetadataResponse};
|
||||
|
|
@ -97,7 +96,7 @@ impl<'a, Context: BuildContext> SourceTreeResolver<'a, Context> {
|
|||
let Ok(url) = Url::from_directory_path(source_tree) else {
|
||||
return Err(anyhow::anyhow!("Failed to convert path to URL"));
|
||||
};
|
||||
let source = SourceUrl::Path(PathSourceUrl {
|
||||
let source = SourceUrl::Directory(DirectorySourceUrl {
|
||||
url: &url,
|
||||
path: Cow::Borrowed(source_tree),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue