Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/uv/src/commands/project/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,7 @@ async fn lock_and_sync(
Box::new(DefaultResolveLogger),
concurrency,
cache,
&WorkspaceCache::default(),
printer,
preview,
)
Expand Down Expand Up @@ -974,6 +975,7 @@ async fn lock_and_sync(
Box::new(SummaryResolveLogger),
concurrency,
cache,
&WorkspaceCache::default(),
printer,
preview,
)
Expand Down Expand Up @@ -1021,6 +1023,7 @@ async fn lock_and_sync(
installer_metadata,
concurrency,
cache,
WorkspaceCache::default(),
DryRun::Disabled,
printer,
preview,
Expand Down
1 change: 1 addition & 0 deletions crates/uv/src/commands/project/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ pub(crate) async fn export(
Box::new(DefaultResolveLogger),
concurrency,
cache,
&workspace_cache,
printer,
preview,
)
Expand Down
11 changes: 8 additions & 3 deletions crates/uv/src/commands/project/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ pub(crate) async fn lock(
Box::new(DefaultResolveLogger),
concurrency,
cache,
&workspace_cache,
printer,
preview,
)
Expand Down Expand Up @@ -263,6 +264,7 @@ pub(super) struct LockOperation<'env> {
logger: Box<dyn ResolveLogger>,
concurrency: Concurrency,
cache: &'env Cache,
workspace_cache: &'env WorkspaceCache,
printer: Printer,
preview: PreviewMode,
}
Expand All @@ -277,6 +279,7 @@ impl<'env> LockOperation<'env> {
logger: Box<dyn ResolveLogger>,
concurrency: Concurrency,
cache: &'env Cache,
workspace_cache: &'env WorkspaceCache,
printer: Printer,
preview: PreviewMode,
) -> Self {
Expand All @@ -289,6 +292,7 @@ impl<'env> LockOperation<'env> {
logger,
concurrency,
cache,
workspace_cache,
printer,
preview,
}
Expand Down Expand Up @@ -334,6 +338,7 @@ impl<'env> LockOperation<'env> {
self.logger,
self.concurrency,
self.cache,
self.workspace_cache,
self.printer,
self.preview,
)
Expand Down Expand Up @@ -372,6 +377,7 @@ impl<'env> LockOperation<'env> {
self.logger,
self.concurrency,
self.cache,
self.workspace_cache,
self.printer,
self.preview,
)
Expand Down Expand Up @@ -402,6 +408,7 @@ async fn do_lock(
logger: Box<dyn ResolveLogger>,
concurrency: Concurrency,
cache: &Cache,
workspace_cache: &WorkspaceCache,
printer: Printer,
preview: PreviewMode,
) -> Result<LockResult, ProjectError> {
Expand Down Expand Up @@ -654,8 +661,6 @@ async fn do_lock(
FlatIndex::from_entries(entries, None, &hasher, build_options)
};

let workspace_cache = WorkspaceCache::default();

// Create a build dispatch.
let build_dispatch = BuildDispatch::new(
&client,
Expand All @@ -674,7 +679,7 @@ async fn do_lock(
&build_hasher,
*exclude_newer,
*sources,
workspace_cache,
workspace_cache.clone(),
concurrency,
preview,
);
Expand Down
2 changes: 2 additions & 0 deletions crates/uv/src/commands/project/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ pub(crate) async fn remove(
Box::new(DefaultResolveLogger),
concurrency,
cache,
&WorkspaceCache::default(),
printer,
preview,
)
Expand Down Expand Up @@ -357,6 +358,7 @@ pub(crate) async fn remove(
installer_metadata,
concurrency,
cache,
WorkspaceCache::default(),
DryRun::Disabled,
printer,
preview,
Expand Down
7 changes: 5 additions & 2 deletions crates/uv/src/commands/project/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
},
concurrency,
cache,
&workspace_cache,
printer,
preview,
)
Expand Down Expand Up @@ -309,6 +310,7 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
installer_metadata,
concurrency,
cache,
workspace_cache.clone(),
DryRun::Disabled,
printer,
preview,
Expand Down Expand Up @@ -407,7 +409,7 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
installer_metadata,
concurrency,
cache,
workspace_cache,
workspace_cache.clone(),
DryRun::Disabled,
printer,
preview,
Expand Down Expand Up @@ -465,7 +467,6 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
};

// Discover and sync the base environment.
let workspace_cache = WorkspaceCache::default();
let temp_dir;
let base_interpreter = if let Some(script_interpreter) = script_interpreter {
// If we found a PEP 723 script and the user provided a project-only setting, warn.
Expand Down Expand Up @@ -721,6 +722,7 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
},
concurrency,
cache,
&workspace_cache,
printer,
preview,
)
Expand Down Expand Up @@ -807,6 +809,7 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
installer_metadata,
concurrency,
cache,
workspace_cache.clone(),
DryRun::Disabled,
printer,
preview,
Expand Down
7 changes: 5 additions & 2 deletions crates/uv/src/commands/project/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ pub(crate) async fn sync(
installer_metadata,
concurrency,
cache,
workspace_cache,
workspace_cache.clone(),
dry_run,
printer,
preview,
Expand Down Expand Up @@ -371,6 +371,7 @@ pub(crate) async fn sync(
Box::new(DefaultResolveLogger),
concurrency,
cache,
&workspace_cache,
printer,
preview,
)
Expand Down Expand Up @@ -452,6 +453,7 @@ pub(crate) async fn sync(
installer_metadata,
concurrency,
cache,
workspace_cache,
dry_run,
printer,
preview,
Expand Down Expand Up @@ -587,6 +589,7 @@ pub(super) async fn do_sync(
installer_metadata: bool,
concurrency: Concurrency,
cache: &Cache,
workspace_cache: WorkspaceCache,
dry_run: DryRun,
printer: Printer,
preview: PreviewMode,
Expand Down Expand Up @@ -748,7 +751,7 @@ pub(super) async fn do_sync(
&build_hasher,
exclude_newer,
sources,
WorkspaceCache::default(),
workspace_cache.clone(),
concurrency,
preview,
);
Expand Down
1 change: 1 addition & 0 deletions crates/uv/src/commands/project/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ pub(crate) async fn tree(
Box::new(DefaultResolveLogger),
concurrency,
cache,
&WorkspaceCache::default(),
printer,
preview,
)
Expand Down
4 changes: 4 additions & 0 deletions crates/uv/src/commands/project/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ async fn print_frozen_version(
Box::new(DefaultResolveLogger),
concurrency,
cache,
&WorkspaceCache::default(),
printer,
preview,
)
Expand Down Expand Up @@ -443,6 +444,7 @@ async fn lock_and_sync(

// Initialize any shared state.
let state = UniversalState::default();
let workspace_cache = WorkspaceCache::default();

// Lock and sync the environment, if necessary.
let lock = match project::lock::LockOperation::new(
Expand All @@ -453,6 +455,7 @@ async fn lock_and_sync(
Box::new(DefaultResolveLogger),
concurrency,
cache,
&workspace_cache,
printer,
preview,
)
Expand Down Expand Up @@ -510,6 +513,7 @@ async fn lock_and_sync(
installer_metadata,
concurrency,
cache,
workspace_cache,
DryRun::Disabled,
printer,
preview,
Expand Down
Loading