mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-26 12:09:12 +00:00
Allow --no-build
to validate lock (#9024)
## Summary Just as we don't enforce tag compliance, we shouldn't enforce `--no-build` when validating the lockfile. If we end up building from source, the distribution database will correctly error. Closes https://github.com/astral-sh/uv/issues/9016.
This commit is contained in:
parent
a3c2a36422
commit
dd4b27bfbd
3 changed files with 8 additions and 10 deletions
|
@ -974,7 +974,6 @@ impl Lock {
|
|||
overrides: &[Requirement],
|
||||
dependency_metadata: &DependencyMetadata,
|
||||
indexes: Option<&IndexLocations>,
|
||||
build_options: &BuildOptions,
|
||||
tags: &Tags,
|
||||
hasher: &HashStrategy,
|
||||
index: &InMemoryIndex,
|
||||
|
@ -1183,8 +1182,13 @@ impl Lock {
|
|||
// Get the metadata for the distribution.
|
||||
let dist = package.to_dist(
|
||||
workspace.install_path(),
|
||||
// When validating, it's okay to use wheels that don't match the current platform.
|
||||
TagPolicy::Preferred(tags),
|
||||
build_options,
|
||||
// When validating, it's okay to use (e.g.) a source distribution with `--no-build`.
|
||||
// We're just trying to determine whether the lockfile is up-to-date. If we end
|
||||
// up needing to build a source distribution in order to do so, below, we'll error
|
||||
// there.
|
||||
&BuildOptions::default(),
|
||||
)?;
|
||||
|
||||
// Fetch the metadata for the distribution.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue