mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-30 23:37:24 +00:00
Include Git member information when getting metadata from cache (#9388)
## Summary Include the `git_member` when fetching metadata from cache. h/t to @PhilipVinc for the suggested fix Resolves #8887 ## Test Plan Pending --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
parent
4ec9ad2537
commit
16ca0c34a1
2 changed files with 222 additions and 7 deletions
|
@ -1378,13 +1378,14 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
|
|||
Cow::Borrowed(fetch.path())
|
||||
};
|
||||
|
||||
let git_member = GitWorkspaceMember {
|
||||
fetch_root: fetch.path(),
|
||||
git_source: resource,
|
||||
};
|
||||
|
||||
if let Some(metadata) =
|
||||
Self::read_static_metadata(source, fetch.path(), resource.subdirectory).await?
|
||||
{
|
||||
let git_member = GitWorkspaceMember {
|
||||
fetch_root: fetch.path(),
|
||||
git_source: resource,
|
||||
};
|
||||
return Ok(ArchiveMetadata::from(
|
||||
Metadata::from_workspace(
|
||||
metadata,
|
||||
|
@ -1416,12 +1417,17 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
|
|||
Cow::Borrowed(fetch.path())
|
||||
};
|
||||
|
||||
let git_member = GitWorkspaceMember {
|
||||
fetch_root: fetch.path(),
|
||||
git_source: resource,
|
||||
};
|
||||
|
||||
debug!("Using cached metadata for: {source}");
|
||||
return Ok(ArchiveMetadata::from(
|
||||
Metadata::from_workspace(
|
||||
metadata.into(),
|
||||
&path,
|
||||
None,
|
||||
Some(&git_member),
|
||||
self.build_context.locations(),
|
||||
self.build_context.sources(),
|
||||
self.build_context.bounds(),
|
||||
|
@ -1454,7 +1460,7 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
|
|||
Metadata::from_workspace(
|
||||
metadata,
|
||||
&path,
|
||||
None,
|
||||
Some(&git_member),
|
||||
self.build_context.locations(),
|
||||
self.build_context.sources(),
|
||||
self.build_context.bounds(),
|
||||
|
@ -1502,7 +1508,7 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
|
|||
Metadata::from_workspace(
|
||||
metadata,
|
||||
fetch.path(),
|
||||
None,
|
||||
Some(&git_member),
|
||||
self.build_context.locations(),
|
||||
self.build_context.sources(),
|
||||
self.build_context.bounds(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue