Skip to content

Commit d3dc599

Browse files
committed
fix(rust): Don't validate the contents of the CDDL because we can't validate all valid CDDL
1 parent 591f688 commit d3dc599

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

rust/catalyst-signed-doc-spec/src/cddl_definitions.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
33
use std::{collections::HashMap, fmt::Display};
44

5-
use cbork_cddl_parser::validate_cddl;
5+
// TODO: Fix CDDL validation
6+
//use cbork_cddl_parser::validate_cddl;
67

78
#[derive(serde::Deserialize)]
89
pub struct CddlDefinitions(HashMap<CddlType, CddlDef>);
@@ -68,12 +69,14 @@ impl CddlDefinitions {
6869
}
6970
}
7071

71-
let mut spec = imports.values().fold(spec, |mut spec, import_spec| {
72+
let spec = imports.values().fold(spec, |mut spec, import_spec| {
7273
spec.push_str(import_spec);
7374
spec
7475
});
7576

76-
validate_cddl(&mut spec, &cbork_cddl_parser::Extension::CDDL)?;
77+
// This is incomplete and does not properly parse valid CDDL specs yet.
78+
// TODO: improve CDDL validation before re-introduction.
79+
// validate_cddl(&mut spec, &cbork_cddl_parser::Extension::CDDL)?;
7780
Ok(spec)
7881
}
7982
}

0 commit comments

Comments
 (0)