Skip to content

Commit f093560

Browse files
committed
fix(prover): revert serde_yaml to serde_yml to match workspace dependency on main
1 parent 8585d20 commit f093560

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

crates/openshell-prover/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ openshell-core = { path = "../openshell-core" }
1515
openshell-policy = { path = "../openshell-policy" }
1616
z3 = { workspace = true }
1717
serde = { workspace = true }
18-
serde_yaml = { workspace = true }
18+
serde_yml = { workspace = true }
1919
miette = { workspace = true }
2020
thiserror = { workspace = true }
2121
tracing = { workspace = true }

crates/openshell-prover/src/accepted_risks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub fn load_accepted_risks(path: &Path) -> Result<Vec<AcceptedRisk>> {
5757
let contents = std::fs::read_to_string(path)
5858
.into_diagnostic()
5959
.wrap_err_with(|| format!("reading accepted risks {}", path.display()))?;
60-
let raw: AcceptedRisksFile = serde_yaml::from_str(&contents)
60+
let raw: AcceptedRisksFile = serde_yml::from_str(&contents)
6161
.into_diagnostic()
6262
.wrap_err("parsing accepted risks YAML")?;
6363

crates/openshell-prover/src/credentials.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ pub fn load_credentials(path: &Path) -> Result<Vec<Credential>> {
158158
let contents = std::fs::read_to_string(path)
159159
.into_diagnostic()
160160
.wrap_err_with(|| format!("reading credentials file {}", path.display()))?;
161-
let raw: CredentialsFile = serde_yaml::from_str(&contents)
161+
let raw: CredentialsFile = serde_yml::from_str(&contents)
162162
.into_diagnostic()
163163
.wrap_err("parsing credentials YAML")?;
164164

@@ -180,7 +180,7 @@ fn load_api_registry(path: &Path) -> Result<ApiCapability> {
180180
let contents = std::fs::read_to_string(path)
181181
.into_diagnostic()
182182
.wrap_err_with(|| format!("reading API registry {}", path.display()))?;
183-
let raw: ApiRegistryDef = serde_yaml::from_str(&contents)
183+
let raw: ApiRegistryDef = serde_yml::from_str(&contents)
184184
.into_diagnostic()
185185
.wrap_err_with(|| format!("parsing API registry {}", path.display()))?;
186186

crates/openshell-prover/src/policy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ struct PolicyFile {
6060
// Ignored fields the prover does not need.
6161
#[serde(default)]
6262
#[allow(dead_code)]
63-
landlock: Option<serde_yaml::Value>,
63+
landlock: Option<serde_yml::Value>,
6464
#[serde(default)]
6565
#[allow(dead_code)]
66-
process: Option<serde_yaml::Value>,
66+
process: Option<serde_yml::Value>,
6767
}
6868

6969
#[derive(Debug, Deserialize)]
@@ -359,7 +359,7 @@ pub fn parse_policy(path: &Path) -> Result<PolicyModel> {
359359

360360
/// Parse a policy YAML string into a [`PolicyModel`].
361361
pub fn parse_policy_str(yaml: &str) -> Result<PolicyModel> {
362-
let raw: PolicyFile = serde_yaml::from_str(yaml)
362+
let raw: PolicyFile = serde_yml::from_str(yaml)
363363
.into_diagnostic()
364364
.wrap_err("parsing policy YAML")?;
365365

crates/openshell-prover/src/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ fn load_binary_capability(path: &Path) -> Result<BinaryCapability> {
255255
let contents = std::fs::read_to_string(path)
256256
.into_diagnostic()
257257
.wrap_err_with(|| format!("reading binary descriptor {}", path.display()))?;
258-
let raw: BinaryCapabilityDef = serde_yaml::from_str(&contents)
258+
let raw: BinaryCapabilityDef = serde_yml::from_str(&contents)
259259
.into_diagnostic()
260260
.wrap_err_with(|| format!("parsing binary descriptor {}", path.display()))?;
261261

0 commit comments

Comments
 (0)