webref
webref copied to clipboard
Validate CDDL extracts during curation step
Reffy now produces CDDL extracts (see #1353). These CDDL extracts are provided as-is with no guarantee whatsoever. Ideally, we'd be able to provide additional guarantees:
- Syntax-wise, the CDDL extracts should be valid. This requires making sure that the CDDL can be parsed.
cddlparsercould perhaps be used but then it's in Python. The main other alternatives arecddlwritten in Rust andcddlcwritten in Ruby. - Semantic-wise, the CDDL should "make sense". Additional checks could be done directly by the CDDL parser (e.g. no duplicate rules) and we probably don't need to go much deeper than that. Ideally though, the semantic checks would also consider the combination of CDDL extracts that share the same namespace. This requires a mechanism to tell how CDDL extracts need to be combined. For example, the CDDL defined in WebDriver BiDi is extended by Permissions and Web Bluetooth but these extensions are only noted informatively in WebDriver BiDi. The extension mechanism could perhaps leverage CDDL Module Structure.
Syntax-wise, the CDDL extracts should be valid.
CDDL syntax is now guaranteed to be valid (according to cddlparser) in curated extracts.