Skip to content

Commit 8df0f72

Browse files
committed
fix some comments
1 parent 3e7358a commit 8df0f72

File tree

4 files changed

+12
-26
lines changed
  • crates
    • pixi_command_dispatcher/src
    • pixi_core/src/lock_file/satisfiability

4 files changed

+12
-26
lines changed

crates/pixi_command_dispatcher/src/solve_conda/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl SolveCondaEnvironmentSpec {
156156
channel: None,
157157
};
158158
let mut record = record.clone();
159-
record.pinned_source_spec = source_metadata.package_build_source.clone();
159+
record.pinned_source_spec = source_metadata.pinned_build_source.clone();
160160
url_to_source_package.insert(url, (record, repodata_record));
161161
}
162162
}

crates/pixi_command_dispatcher/src/source_build/mod.rs

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ pub struct SourceBuildSpec {
5353
/// The location of the source code to build.
5454
pub source: PinnedSourceSpec,
5555

56+
/// Optional path to lock file for reading/writing package_build_source entries
57+
#[serde(skip_serializing_if = "Option::is_none")]
58+
pub pinned_build_source: Option<PinnedSourceSpec>,
59+
5660
/// The channel configuration to use when resolving metadata
5761
pub channel_config: ChannelConfig,
5862

@@ -87,10 +91,6 @@ pub struct SourceBuildSpec {
8791
/// The protocols that are enabled for this source
8892
#[serde(skip_serializing_if = "crate::is_default")]
8993
pub enabled_protocols: EnabledProtocols,
90-
91-
/// Optional path to lock file for reading/writing package_build_source entries
92-
#[serde(skip_serializing_if = "Option::is_none")]
93-
pub pinned_build_source: Option<PinnedSourceSpec>,
9494
}
9595

9696
#[derive(Debug, Clone)]
@@ -860,21 +860,6 @@ pub enum SourceBuildError {
860860

861861
#[error("the package does not contain a valid subdir")]
862862
ConvertSubdir(#[source] ConvertSubdirError),
863-
864-
#[error("failed to read lock file {}: {}", .0.display(), .1)]
865-
LockFileError(PathBuf, String),
866-
867-
#[error("invalid git revision '{}': {}", .0, .1)]
868-
InvalidGitRev(String, String),
869-
870-
#[error("failed to write lock file {}: {}", .0.display(), .1)]
871-
LockFileWriteError(PathBuf, std::io::Error),
872-
873-
#[error("unsupported source type: {}", .0)]
874-
UnsupportedSourceType(String),
875-
876-
#[error("lock file usage violation: {0}")]
877-
LockFilePolicyViolation(String),
878863
}
879864

880865
impl From<DependenciesError> for SourceBuildError {

crates/pixi_command_dispatcher/src/source_metadata/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub struct SourceMetadata {
4545
/// package.
4646
pub source: PinnedSourceSpec,
4747

48-
pub package_build_source: Option<PinnedSourceSpec>,
48+
pub pinned_build_source: Option<PinnedSourceSpec>,
4949

5050
/// All the source records for this particular package.
5151
pub records: Vec<SourceRecord>,
@@ -92,7 +92,7 @@ impl SourceMetadataSpec {
9292
records,
9393
// As the GetMetadata kind returns all records at once and we don't solve them we can skip this.
9494
skipped_packages: Default::default(),
95-
package_build_source: None,
95+
pinned_build_source: None,
9696
})
9797
}
9898
MetadataKind::Outputs { outputs } => {
@@ -116,7 +116,7 @@ impl SourceMetadataSpec {
116116
source: build_backend_metadata.source.clone(),
117117
records: futures.try_collect().await?,
118118
skipped_packages,
119-
package_build_source: build_backend_metadata.package_build_source.clone(),
119+
pinned_build_source: build_backend_metadata.package_build_source.clone(),
120120
})
121121
}
122122
}

crates/pixi_core/src/lock_file/satisfiability/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,9 +1840,10 @@ impl Display for EditablePackagesMismatch {
18401840
}
18411841
}
18421842

1843-
/// Verify that the current package's build.source in the manifest matches the
1844-
/// lock file's package_build_source (if applicable). Path-based sources are not
1845-
/// represented in the lock file's package_build_source and are skipped.
1843+
/// Verify that the current package's build.source in the manifest
1844+
/// matches the lock file's `package_build_source` (if applicable).
1845+
/// Path-based sources are not represented in the lock file's
1846+
/// `package_build_source` and are skipped.
18461847
fn verify_build_source_matches_manifest(
18471848
environment: &Environment<'_>,
18481849
locked_pixi_records: &PixiRecordsByName,

0 commit comments

Comments
 (0)