Skip to content

Commit 481bfd1

Browse files
committed
refactor: align ConfigurationHash field names with PackageBuildInputHash
Renamed field names from "config"/"target_config" to "configuration"/"target_configuration" to be consistent with PackageBuildInputHashBuilder in build_cache.rs.
1 parent e2546d9 commit 481bfd1

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

crates/pixi_command_dispatcher/src/input_hash.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,24 @@ impl Default for ConfigurationHash {
3636
impl ConfigurationHash {
3737
/// Computes a hash from the configuration and target configuration.
3838
pub fn compute(
39-
config: Option<&serde_json::Value>,
40-
target_config: Option<&OrderMap<TargetSelector, serde_json::Value>>,
39+
configuration: Option<&serde_json::Value>,
40+
target_configuration: Option<&OrderMap<TargetSelector, serde_json::Value>>,
4141
) -> Self {
4242
// Use empty JSON object for None values to ensure consistent hashing
4343
let empty_json = serde_json::Value::Object(Default::default());
4444
let empty_target: OrderMap<TargetSelector, serde_json::Value> = OrderMap::default();
4545

46-
let config = config.unwrap_or(&empty_json);
47-
let target_config = target_config
46+
let configuration = configuration.unwrap_or(&empty_json);
47+
let target_configuration = target_configuration
4848
.filter(|c| !c.is_empty())
4949
.unwrap_or(&empty_target);
5050

5151
let mut hasher = Xxh3::new();
5252
StableHashBuilder::new()
53-
.field("config", &StableJson::new(config))
53+
.field("configuration", &StableJson::new(configuration))
5454
.field(
55-
"target_config",
56-
&StableMap::new(target_config.iter().map(|(k, v)| (k, StableJson::new(v)))),
55+
"target_configuration",
56+
&StableMap::new(target_configuration.iter().map(|(k, v)| (k, StableJson::new(v)))),
5757
)
5858
.finish(&mut hasher);
5959
Self(hasher.finish())

0 commit comments

Comments
 (0)