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

chore: revert to use upstream uv and lazylock::force #2848

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
297 changes: 186 additions & 111 deletions Cargo.lock

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ toml_edit = "0.22.22"
tracing = "0.1.41"
tracing-subscriber = "0.3.19"
typed-path = "0.10.0"
uv-distribution-filename = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-distribution-types = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-install-wheel = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-pep440 = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-pep508 = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-platform-tags = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-pypi-types = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-requirements-txt = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-distribution-filename = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-distribution-types = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-install-wheel = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-pep440 = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-pep508 = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-platform-tags = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-pypi-types = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-requirements-txt = { git = "https://github.com/astral-sh/uv", tag = "0.5.6" }

wax = "0.6.0"
which = "7.0.1"
Expand All @@ -130,19 +130,19 @@ rattler_virtual_packages = { version = "1.1.17", default-features = false }

# Bumping this to a higher version breaks the Windows path handling.
url = "2.5.4"
uv-auth = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-cache = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-client = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-configuration = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-dispatch = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-distribution = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-git = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-installer = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-normalize = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-python = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-requirements = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-resolver = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-types = { git = "https://github.com/wolfv/uv", branch = "ignore-rayon-init" }
uv-auth = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-cache = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-client = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-configuration = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-dispatch = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-distribution = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-git = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-installer = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-normalize = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-python = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-requirements = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-resolver = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
uv-types = { git = "https://github.com/astral-sh/uv", tag = "0.5.20" }
winapi = { version = "0.3.9", default-features = false }
xxhash-rust = "0.8.13"
zip = { version = "2.2.2", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions crates/pixi_build_frontend/src/protocol_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ impl Default for EnabledProtocols {
}

#[derive(Debug)]
#[allow(clippy::large_enum_variant)]
pub(crate) enum ProtocolBuilder {
/// A pixi project.
Pixi(pixi_protocol::ProtocolBuilder),
Expand Down
7 changes: 6 additions & 1 deletion crates/pixi_build_frontend/src/tool/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,12 @@ mod tests {
.await
.unwrap();

tool.command().arg("--version").spawn().unwrap();
tool.command()
.arg("--version")
.spawn()
.unwrap()
.wait()
.unwrap();
}

#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
Expand Down
1 change: 1 addition & 0 deletions crates/pixi_build_types/src/project_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ pub struct TargetV1 {

#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[allow(clippy::large_enum_variant)]
pub enum PackageSpecV1 {
/// This is a binary dependency
Binary(BinaryPackageSpecV1),
Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_manifest/src/utils/package_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl<'de> Deserialize<'de> for UniquePackageMap {

struct PackageMap<'a>(&'a IndexMap<rattler_conda_types::PackageName, PixiSpec>);

impl<'de, 'a> DeserializeSeed<'de> for PackageMap<'a> {
impl<'de> DeserializeSeed<'de> for PackageMap<'_> {
type Value = PixiSpanned<rattler_conda_types::PackageName>;

fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_pty/src/unix/pty_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl PtyProcess {
// flags.local_flags |= termios::LocalFlags::ECHO;
// termios::tcsetattr(io::stdin(), termios::SetArg::TCSANOW, &flags)?;

command.exec();
let _ = command.exec();
Err(nix::Error::last())
}
ForkResult::Parent { child: child_pid } => Ok(PtyProcess {
Expand Down
1 change: 0 additions & 1 deletion crates/pixi_record/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ impl PixiRecord {
}

/// Converts this instance into a binary record if it is a binary record.

pub fn into_binary(self) -> Option<RepoDataRecord> {
match self {
PixiRecord::Binary(record) => Some(record),
Expand Down
2 changes: 2 additions & 0 deletions crates/pixi_spec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pub enum SpecConversionError {
/// type that only represents binary packages.
#[derive(Debug, Clone, Hash, ::serde::Serialize, PartialEq, Eq)]
#[serde(untagged)]
#[allow(clippy::large_enum_variant)]
pub enum PixiSpec {
/// The spec is represented solely by a version string. The package should
/// be retrieved from a channel.
Expand Down Expand Up @@ -396,6 +397,7 @@ impl From<PixiSpec> for toml_edit::Value {
///
/// This type only represents binary packages. Use [`PixiSpec`] to represent
/// both binary and source packages.
#[allow(clippy::large_enum_variant)]
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub enum BinarySpec {
/// The spec is represented solely by a version string. The package should
Expand Down
4 changes: 2 additions & 2 deletions crates/pixi_uv_conversions/src/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ fn packages_to_build_isolation<'a>(
names: Option<&'a [PackageName]>,
python_environment: &'a PythonEnvironment,
) -> uv_types::BuildIsolation<'a> {
return if let Some(package_names) = names {
if let Some(package_names) = names {
uv_types::BuildIsolation::SharedPackage(python_environment, package_names)
} else {
uv_types::BuildIsolation::default()
};
}
}

/// Convert optional list of strings to package names
Expand Down
2 changes: 2 additions & 0 deletions crates/pixi_uv_conversions/src/requirements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ pub fn as_uv_req(
.iter()
.map(|e| uv_pep508::ExtraName::new(e.to_string()).expect("conversion failed"))
.collect(),
// TODO: implement groups
groups: vec![],
marker: Default::default(),
source,
origin: None,
Expand Down
2 changes: 1 addition & 1 deletion crates/pypi_mapping/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ pub fn is_conda_forge_record(record: &RepoDataRecord) -> bool {
.channel
.as_ref()
.and_then(|channel| Url::from_str(channel).ok())
.map_or(false, |u| is_conda_forge_url(&u))
.is_some_and(|u| is_conda_forge_url(&u))
}

/// Returns `true` if the specified url refers to a conda-forge channel.
Expand Down
Loading
Loading