@blockml/validator 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocks/org/blockml/bml/compiler/validator/Library.bml +13 -15
- package/blocks/org/blockml/bml/compiler/validator/documentation/DesignDecisions.bml +3 -0
- package/blocks/org/blockml/bml/compiler/validator/documentation/Introduction.bml +5 -2
- package/blocks/org/blockml/bml/compiler/validator/documentation/ValidityContract.bml +55 -0
- package/package.json +3 -3
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
(@blockml/bom). Membership is defined exclusively by this blocks list.
|
|
36
36
|
</documentation>
|
|
37
37
|
|
|
38
|
-
<version>0.
|
|
38
|
+
<version>0.6.0</version>
|
|
39
39
|
|
|
40
40
|
<language>
|
|
41
41
|
<English />
|
|
@@ -56,25 +56,23 @@
|
|
|
56
56
|
<dependencies>
|
|
57
57
|
<composition>
|
|
58
58
|
<blockml:Library />
|
|
59
|
-
</composition>
|
|
60
|
-
<composition>
|
|
61
59
|
<bom:Library />
|
|
62
|
-
</composition>
|
|
63
|
-
<composition>
|
|
64
60
|
<framework:Library />
|
|
65
61
|
</composition>
|
|
66
62
|
</dependencies>
|
|
67
63
|
<blocks>
|
|
68
|
-
<composition><validator:ValidatorType
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
64
|
+
<composition><validator:ValidatorType />
|
|
65
|
+
<valcap:Validate />
|
|
66
|
+
<valdocumentation:Introduction />
|
|
67
|
+
<valdocumentation:ValidityContract />
|
|
68
|
+
<valdocumentation:LayerSeparation />
|
|
69
|
+
<valdocumentation:ValidationPipeline />
|
|
70
|
+
<valdocumentation:PublicApi />
|
|
71
|
+
<valdocumentation:Diagnostics />
|
|
72
|
+
<valdocumentation:PackageOwnership />
|
|
73
|
+
<valdocumentation:ScopeExclusions />
|
|
74
|
+
<valdocumentation:DesignDecisions />
|
|
75
|
+
</composition>
|
|
78
76
|
</blocks>
|
|
79
77
|
</aggregations>
|
|
80
78
|
|
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
Bootstrap modes: bootstrapPaths (corpus flat scan) or libraryPaths (Library.bml graph).
|
|
44
44
|
validateVersions runs after validateTypes and before validateConstraints.
|
|
45
45
|
|
|
46
|
+
Unknown instance memberValues and unresolved type FQNs are errors (not warnings).
|
|
47
|
+
Missing libraries are errors. Domain types must be registered like framework types.
|
|
48
|
+
|
|
46
49
|
No throw on validation failure — aligns with B26 sync diagnostic API across parser,
|
|
47
50
|
serializer, validator, and compiler.</documentation>
|
|
48
51
|
|
|
@@ -39,10 +39,13 @@
|
|
|
39
39
|
optional pragmaticModel. Consumed by @blockml/cli, @blockml/lsp (V2), and hosts.
|
|
40
40
|
|
|
41
41
|
Validator never mutates the input Urmodell. Abort-on-error is a host concern — not
|
|
42
|
-
enforced inside the validator package
|
|
42
|
+
enforced inside the validator package.
|
|
43
|
+
|
|
44
|
+
Validity without XSD: well-formed XML + structural BML + semantic BML against a
|
|
45
|
+
complete TypeRegistry. CLI validate and LSP share this engine.</documentation>
|
|
43
46
|
|
|
44
47
|
<references>
|
|
45
|
-
<see type="valdocumentation:
|
|
48
|
+
<see type="valdocumentation:ValidityContract" relation="ReadNext"></see>
|
|
46
49
|
<see type="bomdocumentation:Introduction" relation="SeeAlso"></see>
|
|
47
50
|
</references>
|
|
48
51
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Validator Documentation — ValidityContract
|
|
3
|
+
FQN: org.blockml.bml.compiler.validator.documentation.ValidityContract
|
|
4
|
+
-->
|
|
5
|
+
<block
|
|
6
|
+
xmlns="http://blockml.org/bml"
|
|
7
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
8
|
+
xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
|
|
9
|
+
"
|
|
10
|
+
xmlns:blockml="org.blockml.bml"
|
|
11
|
+
xmlns:bom="org.blockml.bml.bom"
|
|
12
|
+
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
13
|
+
xmlns:bomcommon="org.blockml.bml.bom.common"
|
|
14
|
+
xmlns:bomdoc="org.blockml.bml.bom.document"
|
|
15
|
+
xmlns:core="org.blockml.bml.core"
|
|
16
|
+
xmlns:def="org.blockml.bml.definition"
|
|
17
|
+
xmlns:framework="org.blockml.bml.framework"
|
|
18
|
+
xmlns:fwcap="org.blockml.bml.framework.capability"
|
|
19
|
+
xmlns:fwdocumentation="org.blockml.bml.framework.documentation"
|
|
20
|
+
xmlns:type="org.blockml.bml.type"
|
|
21
|
+
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
22
|
+
xmlns:valcap="org.blockml.bml.compiler.validator.capability"
|
|
23
|
+
xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
|
|
24
|
+
xmlns:pardocumentation="org.blockml.bml.compiler.parser.documentation"
|
|
25
|
+
xmlns:doc="org.blockml.bml.documentation">
|
|
26
|
+
|
|
27
|
+
<name>ValidityContract</name>
|
|
28
|
+
<type>valdocumentation:ValidityContract</type>
|
|
29
|
+
<baseType>core:Documentation</baseType>
|
|
30
|
+
<is>What counts as valid BlockML without XSD</is>
|
|
31
|
+
|
|
32
|
+
<documentation>valid BlockML = well-formed XML + valid BML structure + valid BML semantics.
|
|
33
|
+
|
|
34
|
+
CLI blockml validate and LSP analyzeDocument consume the same parse + validate engine.
|
|
35
|
+
Generated XSD is a non-authoritative render-target projection and is not consulted.
|
|
36
|
+
|
|
37
|
+
Severity: error = not valid BlockML; warning = valid but problematic (deprecation);
|
|
38
|
+
info = hint. Unknown element, attribute, member, type, block, or missing library is error.
|
|
39
|
+
|
|
40
|
+
Semantic checks (this package / framework): every type FQN must resolve in the
|
|
41
|
+
TypeRegistry or be a well-known primitive; instance typeFqn and memberValues keys
|
|
42
|
+
must match effective members. Unresolved references are errors. A missing library
|
|
43
|
+
is BML_LIBRARY_RESOLVE_ERROR — analogous to a Java class without its Maven artifact.
|
|
44
|
+
|
|
45
|
+
Structural/semantic errors are node-local: they set success=false but keep the BOM
|
|
46
|
+
(preserve-on-error). XML syntax errors may yield document null.
|
|
47
|
+
|
|
48
|
+
Unknown instance members stay in memberValues plus BML_UNKNOWN_PROPERTY error.</documentation>
|
|
49
|
+
|
|
50
|
+
<references>
|
|
51
|
+
<see type="pardocumentation:StructuralGrammar" relation="SeeAlso"></see>
|
|
52
|
+
<see type="valdocumentation:ValidationPipeline" relation="ReadNext"></see>
|
|
53
|
+
</references>
|
|
54
|
+
|
|
55
|
+
</block>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockml/validator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "BlockML validator — semantic validation of BOM documents",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"test": "vitest run packages/validator/test"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@blockml/bom": "^0.
|
|
35
|
+
"@blockml/bom": "^0.6.0",
|
|
36
36
|
"@blockml/core": "^1.0.5",
|
|
37
|
-
"@blockml/framework": "^0.
|
|
37
|
+
"@blockml/framework": "^0.6.0"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=20"
|