Skip to content

Commit

Permalink
Add basic tests for lockfile generation (#3623)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh authored May 16, 2024
1 parent 0a055b7 commit 3b8e8de
Show file tree
Hide file tree
Showing 3 changed files with 568 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/uv/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ pub(crate) struct PipInstallArgs {
#[arg(long)]
pub(crate) dry_run: bool,

#[arg(long, hide = true)]
#[arg(long, hide = true, group = "sources")]
pub(crate) unstable_uv_lock_file: Option<String>,

#[command(flatten)]
Expand Down
7 changes: 6 additions & 1 deletion crates/uv/src/commands/pip/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,12 @@ pub(crate) async fn pip_install(
// If the requirements are already satisfied, we're done. Ideally, the resolver would be fast
// enough to let us remove this check. But right now, for large environments, it's an order of
// magnitude faster to validate the environment than to resolve the requirements.
if reinstall.is_none() && upgrade.is_none() && source_trees.is_empty() && overrides.is_empty() {
if reinstall.is_none()
&& upgrade.is_none()
&& source_trees.is_empty()
&& overrides.is_empty()
&& uv_lock.is_none()
{
match site_packages.satisfies(&requirements, &editables, &constraints)? {
SatisfiesResult::Fresh {
recursive_requirements,
Expand Down
Loading

0 comments on commit 3b8e8de

Please sign in to comment.