diff --git a/Cargo.lock b/Cargo.lock index 7979d59..b1046bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1137,7 +1137,7 @@ dependencies = [ [[package]] name = "fancy_display" version = "0.1.0" -source = "git+https://github.com/prefix-dev/pixi?branch=main#a0f8317b047e38365140dd0a8b69579fe6900f1e" +source = "git+https://github.com/baszalmstra/pixi?branch=fix/build_protocol_more#9bc3d8e65dd45e15dbcd1d3820362bc319a1b023" dependencies = [ "console", ] @@ -3121,7 +3121,7 @@ dependencies = [ [[package]] name = "pixi_build_type_conversions" version = "0.1.0" -source = "git+https://github.com/prefix-dev/pixi?branch=main#a0f8317b047e38365140dd0a8b69579fe6900f1e" +source = "git+https://github.com/baszalmstra/pixi?branch=fix/build_protocol_more#9bc3d8e65dd45e15dbcd1d3820362bc319a1b023" dependencies = [ "indexmap 2.7.0", "itertools 0.13.0", @@ -3134,7 +3134,7 @@ dependencies = [ [[package]] name = "pixi_build_types" version = "0.1.0" -source = "git+https://github.com/prefix-dev/pixi?branch=main#a0f8317b047e38365140dd0a8b69579fe6900f1e" +source = "git+https://github.com/baszalmstra/pixi?branch=fix/build_protocol_more#9bc3d8e65dd45e15dbcd1d3820362bc319a1b023" dependencies = [ "indexmap 2.7.0", "rattler_conda_types", @@ -3148,7 +3148,7 @@ dependencies = [ [[package]] name = "pixi_config" version = "0.1.0" -source = "git+https://github.com/prefix-dev/pixi?branch=main#a0f8317b047e38365140dd0a8b69579fe6900f1e" +source = "git+https://github.com/baszalmstra/pixi?branch=fix/build_protocol_more#9bc3d8e65dd45e15dbcd1d3820362bc319a1b023" dependencies = [ "clap", "console", @@ -3173,7 +3173,7 @@ dependencies = [ [[package]] name = "pixi_consts" version = "0.1.0" -source = "git+https://github.com/prefix-dev/pixi?branch=main#a0f8317b047e38365140dd0a8b69579fe6900f1e" +source = "git+https://github.com/baszalmstra/pixi?branch=fix/build_protocol_more#9bc3d8e65dd45e15dbcd1d3820362bc319a1b023" dependencies = [ "console", "rattler_cache", @@ -3184,7 +3184,7 @@ dependencies = [ [[package]] name = "pixi_git" version = "0.0.1" -source = "git+https://github.com/prefix-dev/pixi?branch=main#a0f8317b047e38365140dd0a8b69579fe6900f1e" +source = "git+https://github.com/baszalmstra/pixi?branch=fix/build_protocol_more#9bc3d8e65dd45e15dbcd1d3820362bc319a1b023" dependencies = [ "dashmap", "dunce", @@ -3205,7 +3205,7 @@ dependencies = [ [[package]] name = "pixi_manifest" version = "0.1.0" -source = "git+https://github.com/prefix-dev/pixi?branch=main#a0f8317b047e38365140dd0a8b69579fe6900f1e" +source = "git+https://github.com/baszalmstra/pixi?branch=fix/build_protocol_more#9bc3d8e65dd45e15dbcd1d3820362bc319a1b023" dependencies = [ "console", "dunce", @@ -3238,7 +3238,7 @@ dependencies = [ [[package]] name = "pixi_spec" version = "0.1.0" -source = "git+https://github.com/prefix-dev/pixi?branch=main#a0f8317b047e38365140dd0a8b69579fe6900f1e" +source = "git+https://github.com/baszalmstra/pixi?branch=fix/build_protocol_more#9bc3d8e65dd45e15dbcd1d3820362bc319a1b023" dependencies = [ "dirs 5.0.1", "file_url", @@ -3261,7 +3261,7 @@ dependencies = [ [[package]] name = "pixi_toml" version = "0.1.0" -source = "git+https://github.com/prefix-dev/pixi?branch=main#a0f8317b047e38365140dd0a8b69579fe6900f1e" +source = "git+https://github.com/baszalmstra/pixi?branch=fix/build_protocol_more#9bc3d8e65dd45e15dbcd1d3820362bc319a1b023" dependencies = [ "digest", "hex", @@ -3274,7 +3274,7 @@ dependencies = [ [[package]] name = "pixi_utils" version = "0.1.0" -source = "git+https://github.com/prefix-dev/pixi?branch=main#a0f8317b047e38365140dd0a8b69579fe6900f1e" +source = "git+https://github.com/baszalmstra/pixi?branch=fix/build_protocol_more#9bc3d8e65dd45e15dbcd1d3820362bc319a1b023" dependencies = [ "async-fd-lock", "fs-err", diff --git a/Cargo.toml b/Cargo.toml index 951d398..fd38cf3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,8 +40,8 @@ rattler_conda_types = { version = "0.29.9", default-features = false } rattler_package_streaming = { version = "0.22.22", default-features = false } rattler_virtual_packages = { version = "1.1.17", default-features = false } -pixi_build_types = { git = "https://github.com/prefix-dev/pixi", branch = "main" } -pixi_consts = { git = "https://github.com/prefix-dev/pixi", branch = "main" } -pixi_manifest = { git = "https://github.com/prefix-dev/pixi", branch = "main" } -pixi_spec = { git = "https://github.com/prefix-dev/pixi", branch = "main" } -pixi_build_type_conversions = { git = "https://github.com/prefix-dev/pixi", branch = "main" } +pixi_build_types = { git = "https://github.com/baszalmstra/pixi", branch = "fix/build_protocol_more" } +pixi_consts = { git = "https://github.com/baszalmstra/pixi", branch = "fix/build_protocol_more" } +pixi_manifest = { git = "https://github.com/baszalmstra/pixi", branch = "fix/build_protocol_more" } +pixi_spec = { git = "https://github.com/baszalmstra/pixi", branch = "fix/build_protocol_more" } +pixi_build_type_conversions = { git = "https://github.com/baszalmstra/pixi", branch = "fix/build_protocol_more" } diff --git a/crates/pixi-build/src/bin/pixi-build-cmake/cmake.rs b/crates/pixi-build/src/bin/pixi-build-cmake/cmake.rs index 43ef0b4..68ed86e 100644 --- a/crates/pixi-build/src/bin/pixi-build-cmake/cmake.rs +++ b/crates/pixi-build/src/bin/pixi-build-cmake/cmake.rs @@ -213,8 +213,10 @@ impl CMakeBuildBackend { ) -> miette::Result { // Parse the package name from the manifest let project_model = &self.project_model; - let name = PackageName::from_str(&project_model.name).into_diagnostic()?; + let version = self.project_model.version.clone().ok_or_else(|| { + miette::miette!("a version is missing from the package but it is required") + })?; let noarch_type = NoArchType::none(); @@ -236,7 +238,7 @@ impl CMakeBuildBackend { schema_version: 1, context: Default::default(), package: Package { - version: self.project_model.version.clone().into(), + version: version.into(), name, }, cache: None, diff --git a/crates/pixi-build/src/bin/pixi-build-python/python.rs b/crates/pixi-build/src/bin/pixi-build-python/python.rs index 52a4e15..9f98fbe 100644 --- a/crates/pixi-build/src/bin/pixi-build-python/python.rs +++ b/crates/pixi-build/src/bin/pixi-build-python/python.rs @@ -239,7 +239,9 @@ impl PythonBuildBackend { ) -> miette::Result { // Parse the package name and version from the manifest let name = PackageName::from_str(&self.project_model.name).into_diagnostic()?; - let version = self.project_model.version.clone(); + let version = self.project_model.version.clone().ok_or_else(|| { + miette::miette!("a version is missing from the package but it is required") + })?; // Determine whether the package should be built as a noarch package or as a // generic package.