v0.2.1-pre.004-fix.002

This commit is contained in:
2026-08-17 19:47:24 +02:00
parent 9c1568ee1c
commit bc71fba289
3 changed files with 60 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-onchain-transport-lib/tests/dependency_boundary.rs
// version: 4
// version: 5
//! Integration canary for the direct dependency firewall of `ksp-onchain-transport-lib`.
@@ -34,11 +34,26 @@ fn workspace_dependency_table_does_not_activate_consumer_features() {
std::result::Result::Ok(value) => value,
std::result::Result::Err(_) => return,
};
let workspace_dependencies = manifest.split("[workspace.dependencies]").nth(1).and_then(|tail| tail.split("[workspace.lints.rust]").next());
let workspace_dependencies = match manifest.split("[workspace.dependencies]").nth(1) {
std::option::Option::Some(tail) => tail.split("[workspace.lints.rust]").next(),
std::option::Option::None => std::option::Option::None,
};
assert!(workspace_dependencies.is_some(), "workspace dependencies section must exist");
let workspace_dependencies = match workspace_dependencies {
std::option::Option::Some(value) => value,
std::option::Option::None => return,
};
assert!(!workspace_dependencies.contains("features ="), "consumer feature activation must stay in member manifests");
for line in workspace_dependencies.lines() {
let content = match line.split('#').next() {
std::option::Option::Some(value) => value,
std::option::Option::None => continue,
};
for inline_field in content.split(',') {
let key = match inline_field.split('=').next() {
std::option::Option::Some(value) => value.trim().trim_start_matches('{').trim(),
std::option::Option::None => continue,
};
assert_ne!(key, "features", "consumer feature activation must stay in member manifests");
}
}
}