Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Support editables in uv sync (#3692)" #3696

Merged
merged 1 commit into from
May 21, 2024
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: 1 addition & 2 deletions crates/uv/src/commands/project/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ pub(crate) async fn lock(
.build();

// Build all editable distributions. The editables are shared between resolution and
// installation, and should live for the duration of the command. If an editable is already
// installed in the environment, we'll still re-build it here.
// installation, and should live for the duration of the command.
let editables = ResolvedEditables::resolve(
spec.editables.clone(),
&EmptyInstalledPackages,
Expand Down
6 changes: 3 additions & 3 deletions crates/uv/src/commands/project/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ pub(crate) async fn resolve<InstalledPackages: InstalledPackagesProvider>(
let requirements = {
// Convert from unnamed to named requirements.
let mut requirements = NamedRequirementsResolver::new(
requirements.clone(),
requirements,
hasher,
index,
DistributionDatabase::new(client, build_dispatch, concurrency.downloads),
Expand All @@ -178,7 +178,7 @@ pub(crate) async fn resolve<InstalledPackages: InstalledPackagesProvider>(
if !source_trees.is_empty() {
requirements.extend(
SourceTreeResolver::new(
source_trees.clone(),
source_trees,
&ExtrasSpecification::None,
hasher,
index,
Expand Down Expand Up @@ -214,7 +214,7 @@ pub(crate) async fn resolve<InstalledPackages: InstalledPackagesProvider>(
constraints,
overrides,
preferences,
project.clone(),
project,
editable_metadata,
exclusions,
lookaheads,
Expand Down
21 changes: 3 additions & 18 deletions crates/uv/src/commands/project/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use install_wheel_rs::linker::LinkMode;
use uv_cache::Cache;
use uv_client::RegistryClientBuilder;
use uv_configuration::{
Concurrency, ConfigSettings, NoBinary, NoBuild, PreviewMode, Reinstall, SetupPyStrategy,
Concurrency, ConfigSettings, NoBinary, NoBuild, PreviewMode, SetupPyStrategy,
};
use uv_dispatch::BuildDispatch;
use uv_installer::SitePackages;
Expand Down Expand Up @@ -55,8 +55,6 @@ pub(crate) async fn sync(
.platform(venv.interpreter().platform())
.build();

let site_packages = SitePackages::from_executable(&venv)?;

// TODO(charlie): Respect project configuration.
let build_isolation = BuildIsolation::default();
let config_settings = ConfigSettings::default();
Expand All @@ -70,7 +68,6 @@ pub(crate) async fn sync(
let no_build = NoBuild::default();
let setup_py = SetupPyStrategy::default();
let concurrency = Concurrency::default();
let reinstall = Reinstall::None;

// Create a build dispatch.
let build_dispatch = BuildDispatch::new(
Expand All @@ -90,20 +87,8 @@ pub(crate) async fn sync(
concurrency,
);

let editables = ResolvedEditables::resolve(
Vec::new(), // TODO(konsti): Read editables from lockfile
&site_packages,
&reinstall,
&hasher,
venv.interpreter(),
tags,
cache,
&client,
&build_dispatch,
concurrency,
printer,
)
.await?;
// TODO(konsti): Read editables from lockfile.
let editables = ResolvedEditables::default();

let site_packages = SitePackages::from_executable(&venv)?;

Expand Down
Loading