Skip to content

Commit ae0c4dc

Browse files
remimimimimiHofer-Julian
authored andcommitted
feat(build): git source (#4446)
Allows specifying of out-of-tree source builds, for git as well as path (path was supported). And makes the out-of-tree source location available in more parts of the code.
1 parent 69fb06b commit ae0c4dc

File tree

47 files changed

+1982
-181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1982
-181
lines changed

Cargo.lock

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ clap = { version = "4.5.31", default-features = false }
3131
clap_complete = "4.5.46"
3232
clap_complete_nushell = "4.5.5"
3333
# Rattler crates
34-
coalesced_map = "0.1.1"
34+
coalesced_map = "0.1.2"
3535
concat-idents = "1.1.5"
3636
console = "0.15.10"
3737
console-subscriber = "0.4.1"
@@ -146,6 +146,7 @@ self-replace = "1.5.0"
146146
serde = "1.0.218"
147147
serde-untagged = "0.1.6"
148148
serde-value = "0.7.0"
149+
serde_derive = "*"
149150
serde_ignored = "0.1.10"
150151
serde_json = "1.0.139"
151152
serde_with = "=3.14.0"

crates/pixi_build_discovery/src/discovery.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub struct BackendInitializationParams {
4949
pub workspace_root: PathBuf,
5050

5151
/// The location of the source code.
52-
pub source: Option<SourceLocationSpec>,
52+
pub build_source: Option<SourceLocationSpec>,
5353

5454
/// The anchor for relative paths to the location of the source code.
5555
pub source_anchor: PathBuf,
@@ -202,7 +202,7 @@ impl DiscoveredBackend {
202202
backend_spec: BackendSpec::JsonRpc(JsonRpcBackendSpec::default_rattler_build(channels)),
203203
init_params: BackendInitializationParams {
204204
workspace_root: source_dir.clone(),
205-
source: None,
205+
build_source: None,
206206
source_anchor: source_dir,
207207
manifest_path: recipe_absolute_path,
208208
project_model: None,
@@ -273,7 +273,7 @@ impl DiscoveredBackend {
273273
init_params: BackendInitializationParams {
274274
workspace_root,
275275
manifest_path: provenance.path.clone(),
276-
source: build_system.source,
276+
build_source: build_system.source,
277277
source_anchor: provenance
278278
.path
279279
.parent()
@@ -374,7 +374,7 @@ impl DiscoveredBackend {
374374
backend_spec: BackendSpec::JsonRpc(JsonRpcBackendSpec::default_ros_build(channels)),
375375
init_params: BackendInitializationParams {
376376
workspace_root: source_dir.clone(),
377-
source: None,
377+
build_source: None,
378378
source_anchor: source_dir,
379379
manifest_path: package_xml_absolute_path,
380380
project_model: Some(ProjectModelV1::default()),

crates/pixi_build_discovery/tests/snapshots/discovery__direct_package_xml.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ backend-spec:
1414
- "https://prefix.dev/conda-forge"
1515
init-params:
1616
workspace-root: "file://<ROOT>/ros-package"
17-
source: ~
17+
build-source: ~
1818
source-anchor: "file://<ROOT>/ros-package"
1919
manifest-path: "file://<ROOT>/ros-package/package.xml"
2020
project-model:

crates/pixi_build_discovery/tests/snapshots/discovery__direct_recipe.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ backend-spec:
1414
- "https://prefix.dev/conda-forge"
1515
init-params:
1616
workspace-root: "file://<ROOT>/recipe_yaml"
17-
source: ~
17+
build-source: ~
1818
source-anchor: "file://<ROOT>/recipe_yaml"
1919
manifest-path: "file://<ROOT>/recipe_yaml/recipe.yaml"
2020
project-model: ~

crates/pixi_build_discovery/tests/snapshots/discovery__discovery@inherit__nested.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ backend-spec:
1515
- "https://prefix.dev/pixi-build-backends"
1616
init-params:
1717
workspace-root: "file://<ROOT>/inherit"
18-
source: ~
18+
build-source: ~
1919
source-anchor: "file://<ROOT>/inherit/nested"
2020
manifest-path: "file://<ROOT>/inherit/nested/pixi.toml"
2121
project-model:

crates/pixi_build_discovery/tests/snapshots/discovery__discovery@nested__nested.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ backend-spec:
1515
- "https://prefix.dev/pixi-build-backends"
1616
init-params:
1717
workspace-root: "file://<ROOT>/nested"
18-
source: ~
18+
build-source: ~
1919
source-anchor: "file://<ROOT>/nested/nested"
2020
manifest-path: "file://<ROOT>/nested/nested/pixi.toml"
2121
project-model:

crates/pixi_build_discovery/tests/snapshots/discovery__discovery@nested_recipe_yml.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ backend-spec:
1515
- "https://prefix.dev/conda-forge"
1616
init-params:
1717
workspace-root: "file://<ROOT>/nested_recipe_yml"
18-
source: ~
18+
build-source: ~
1919
source-anchor: "file://<ROOT>/nested_recipe_yml"
2020
manifest-path: "file://<ROOT>/nested_recipe_yml/recipe/recipe.yml"
2121
project-model: ~

crates/pixi_build_discovery/tests/snapshots/discovery__discovery@recipe_yaml.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ backend-spec:
1515
- "https://prefix.dev/conda-forge"
1616
init-params:
1717
workspace-root: "file://<ROOT>/recipe_yaml"
18-
source: ~
18+
build-source: ~
1919
source-anchor: "file://<ROOT>/recipe_yaml"
2020
manifest-path: "file://<ROOT>/recipe_yaml/recipe.yaml"
2121
project-model: ~

crates/pixi_build_discovery/tests/snapshots/discovery__discovery@recipe_yml.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ backend-spec:
1515
- "https://prefix.dev/conda-forge"
1616
init-params:
1717
workspace-root: "file://<ROOT>/recipe_yml"
18-
source: ~
18+
build-source: ~
1919
source-anchor: "file://<ROOT>/recipe_yml"
2020
manifest-path: "file://<ROOT>/recipe_yml/recipe.yml"
2121
project-model: ~

0 commit comments

Comments
 (0)