@blockml/framework 0.9.4 → 0.9.6
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/framework/FrameworkType.bml +16 -20
- package/blocks/org/blockml/bml/framework/Library.bml +21 -29
- package/blocks/org/blockml/bml/framework/README.bml +15 -22
- package/blocks/org/blockml/bml/framework/capability/BootstrapFullProjectRegistry.bml +25 -23
- package/blocks/org/blockml/bml/framework/capability/BootstrapTypeRegistry.bml +19 -21
- package/blocks/org/blockml/bml/framework/capability/CollectBaseTypeChain.bml +22 -21
- package/blocks/org/blockml/bml/framework/capability/DefaultBootstrapPaths.bml +19 -20
- package/blocks/org/blockml/bml/framework/capability/EvaluateExpression.bml +19 -20
- package/blocks/org/blockml/bml/framework/capability/EvaluateInterpolatedText.bml +19 -20
- package/blocks/org/blockml/bml/framework/capability/EvaluateParseValue.bml +23 -23
- package/blocks/org/blockml/bml/framework/capability/FindLocalMember.bml +22 -22
- package/blocks/org/blockml/bml/framework/capability/ForkBom.bml +19 -21
- package/blocks/org/blockml/bml/framework/capability/GetExportedFqns.bml +25 -22
- package/blocks/org/blockml/bml/framework/capability/GetPropertyNumericValue.bml +19 -20
- package/blocks/org/blockml/bml/framework/capability/IsLiteralValue.bml +19 -20
- package/blocks/org/blockml/bml/framework/capability/MemberIdentityKey.bml +19 -20
- package/blocks/org/blockml/bml/framework/capability/ParseExpression.bml +19 -21
- package/blocks/org/blockml/bml/framework/capability/ParseInterpolatedText.bml +22 -21
- package/blocks/org/blockml/bml/framework/capability/PeekLibraryTypeFqn.bml +19 -21
- package/blocks/org/blockml/bml/framework/capability/ProjectLibraryPackageDirs.bml +19 -20
- package/blocks/org/blockml/bml/framework/capability/ProjectLibraryPackageRoots.bml +19 -20
- package/blocks/org/blockml/bml/framework/capability/ProjectSourceRoots.bml +22 -21
- package/blocks/org/blockml/bml/framework/capability/RegistryFilesUnderRoots.bml +22 -21
- package/blocks/org/blockml/bml/framework/capability/ResolveContracts.bml +22 -22
- package/blocks/org/blockml/bml/framework/capability/ResolveEffectiveMembers.bml +36 -20
- package/blocks/org/blockml/bml/framework/capability/ResolveLibrarySeeds.bml +22 -22
- package/blocks/org/blockml/bml/framework/capability/RootFqnByFilePath.bml +19 -20
- package/blocks/org/blockml/bml/framework/capability/RootFqns.bml +19 -20
- package/blocks/org/blockml/bml/framework/capability/TypeRegistry.bml +12 -19
- package/blocks/org/blockml/bml/framework/capability/ValidateConstraints.bml +22 -22
- package/blocks/org/blockml/bml/framework/capability/ValidateEmbeddedBlocks.bml +19 -20
- package/blocks/org/blockml/bml/framework/capability/ValidateGenerics.bml +25 -24
- package/blocks/org/blockml/bml/framework/capability/ValidateInstances.bml +22 -21
- package/blocks/org/blockml/bml/framework/capability/ValidatePresets.bml +22 -21
- package/blocks/org/blockml/bml/framework/capability/ValidateReadOnly.bml +22 -21
- package/blocks/org/blockml/bml/framework/capability/ValidateTypes.bml +34 -25
- package/blocks/org/blockml/bml/framework/capability/ValidateVersions.bml +22 -22
- package/blocks/org/blockml/bml/framework/capability/ValidateVisibility.bml +22 -21
- package/blocks/org/blockml/bml/framework/config/FrameworkDiagnosticCodes.bml +16 -19
- package/blocks/org/blockml/bml/framework/documentation/ArchitectureOverview.bml +16 -21
- package/blocks/org/blockml/bml/framework/documentation/ConstraintValidation.bml +17 -22
- package/blocks/org/blockml/bml/framework/documentation/Diagnostics.bml +27 -29
- package/blocks/org/blockml/bml/framework/documentation/EffectiveMembers.bml +18 -23
- package/blocks/org/blockml/bml/framework/documentation/ExpressionParsing.bml +23 -24
- package/blocks/org/blockml/bml/framework/documentation/Introduction.bml +17 -22
- package/blocks/org/blockml/bml/framework/documentation/LayerSeparation.bml +19 -24
- package/blocks/org/blockml/bml/framework/documentation/PackageOwnership.bml +19 -24
- package/blocks/org/blockml/bml/framework/documentation/PublicApi.bml +19 -22
- package/blocks/org/blockml/bml/framework/documentation/ScopeExclusions.bml +16 -21
- package/blocks/org/blockml/bml/framework/documentation/TypeRegistryBootstrap.bml +22 -27
- package/blocks/org/blockml/bml/framework/expression/ArrayExpressionNode.bml +19 -20
- package/blocks/org/blockml/bml/framework/expression/BinaryExpressionNode.bml +25 -22
- package/blocks/org/blockml/bml/framework/expression/CallExpressionNode.bml +22 -21
- package/blocks/org/blockml/bml/framework/expression/ExpressionNode.bml +16 -20
- package/blocks/org/blockml/bml/framework/expression/InterpolatedStringNode.bml +19 -20
- package/blocks/org/blockml/bml/framework/expression/LiteralExpressionNode.bml +19 -20
- package/blocks/org/blockml/bml/framework/expression/ObjectExpressionEntry.bml +19 -20
- package/blocks/org/blockml/bml/framework/expression/ObjectExpressionNode.bml +19 -20
- package/blocks/org/blockml/bml/framework/expression/ParseExpressionError.bml +19 -20
- package/blocks/org/blockml/bml/framework/expression/ParseExpressionOutcome.bml +22 -21
- package/blocks/org/blockml/bml/framework/expression/ParseExpressionResult.bml +19 -20
- package/blocks/org/blockml/bml/framework/expression/PropertyExpressionNode.bml +19 -20
- package/blocks/org/blockml/bml/framework/registry/BootstrapOptions.bml +22 -21
- package/blocks/org/blockml/bml/framework/registry/BootstrapResult.bml +25 -22
- package/blocks/org/blockml/bml/framework/registry/BootstrapTrace.bml +28 -23
- package/dist/expression/parse-expression.d.ts.map +1 -1
- package/dist/expression/parse-expression.js +4 -1
- package/dist/expression/parse-expression.js.map +1 -1
- package/dist/expression/parse-interpolated-text.d.ts.map +1 -1
- package/dist/expression/parse-interpolated-text.js +60 -30
- package/dist/expression/parse-interpolated-text.js.map +1 -1
- package/dist/resolve/resolve-effective-members.d.ts.map +1 -1
- package/dist/resolve/resolve-effective-members.js +21 -0
- package/dist/resolve/resolve-effective-members.js.map +1 -1
- package/dist/validate/validate-parse-values.d.ts.map +1 -1
- package/dist/validate/validate-parse-values.js +8 -12
- package/dist/validate/validate-parse-values.js.map +1 -1
- package/dist/validate/validate-references.d.ts.map +1 -1
- package/dist/validate/validate-references.js +18 -3
- package/dist/validate/validate-references.js.map +1 -1
- package/dist/validate/validate-types.d.ts.map +1 -1
- package/dist/validate/validate-types.js +17 -26
- package/dist/validate/validate-types.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
"
|
|
1
|
+
<!--Framework Documentation — Diagnostics
|
|
2
|
+
FQN: org.blockml.bml.framework.documentation.Diagnostics-->
|
|
3
|
+
<fwdocumentation:Diagnostics xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -32,65 +26,69 @@
|
|
|
32
26
|
xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
|
|
33
27
|
xmlns:doc="org.blockml.bml.documentation">
|
|
34
28
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<is>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
<baseType>
|
|
30
|
+
core:Documentation
|
|
31
|
+
</baseType>
|
|
32
|
+
<is>
|
|
33
|
+
Framework diagnostic codes
|
|
34
|
+
</is>
|
|
35
|
+
<documentation>
|
|
36
|
+
Diagnostic codes emitted by framework utilities (see fwconfig:FrameworkDiagnosticCodes):
|
|
37
|
+
|
|
42
38
|
validateTypes (type-driven reference walk — declared ValueType, never the field name):
|
|
43
39
|
• BML_UNKNOWN_BASE_TYPE — baseType FQN not in TypeRegistry (at baseTypeSource)
|
|
44
40
|
• BML_UNKNOWN_CONTRACT — contracts[] FQN not in TypeRegistry
|
|
45
41
|
• BML_UNKNOWN_TYPE — TypeReference / TypeReferenceEntity value, PackageReference, see type=/relation=/language=, member types, groups, language — FQN or package not in TypeRegistry and not a well-known primitive. Authored QNames / TypeExpressions on TypeReference values resolve via document.source.namespaceBindings before the lookup; the canonical default is reported once (value, not also values[namespace=""])
|
|
46
42
|
• BML_UNKNOWN_PROPERTY — PropertyReference / AggregationReference / AssociationReference / CapabilityReference path does not resolve (or BML_UNKNOWN_TYPE if the owning type cannot be resolved)
|
|
47
|
-
• BML_UNRESOLVABLE_INSTANCE_REF — InstanceReference / InstanceReferenceEntity value does not resolve to a document instance id
|
|
43
|
+
• BML_UNRESOLVABLE_INSTANCE_REF — InstanceReference / InstanceReferenceEntity value does not resolve to a document instance id. List values (JSON ['id'] or repeated instance tags) are checked item-wise.
|
|
48
44
|
• BML_TYPE_BOUND_NOT_SATISFIED — TypeReference(B) / TypeReferenceEntity(B) value fails bound B (capability throws[] defaults to core:Exception)
|
|
49
45
|
TypeIdentifier / PackageIdentifier / InstanceIdentifier / MemberIdentifier (and *IdentifierEntity) values are not existence-checked. block.type is TypeIdentifier.
|
|
50
46
|
• BML_MEMBER_COLLISION — duplicate member identity in effective set
|
|
51
|
-
• BML_OVERRIDE_WITHOUT_PARENT — override without
|
|
52
|
-
• BML_OVERRIDE_REQUIRED — override
|
|
47
|
+
• BML_OVERRIDE_WITHOUT_PARENT — override="true" without a matching inherited or contract member
|
|
48
|
+
• BML_OVERRIDE_REQUIRED — local redeclaration of an inherited or contract member without override="true" (all member kinds, including aggregation composition fills)
|
|
53
49
|
• BML_EXPRESSION_PARSE_ERROR — parseExpression failed on ExpressionValue.raw
|
|
54
50
|
• BML_EXPR_SYNTAX_ERROR — unclosed ${} in interpolated text
|
|
55
51
|
• BML_EXPR_NOT_ALLOWED_IN_INTERPOLATION — hole uses @model, @bean, or a forbidden call
|
|
56
52
|
• BML_EXPR_TYPE_MISMATCH — interpolated text on a non-Text member
|
|
57
53
|
• BML_INVALID_VALUE — PrimitiveType.parseValue threw on a canonical BML literal
|
|
58
54
|
(property.value, values[namespace=""], instance memberValues, TypeReferenceEntity.value).
|
|
55
|
+
A JSON-like `[…]` payload without `[]` multiplicity is also this code
|
|
56
|
+
(collection on a non-list type), including on StructType. Struct values are
|
|
57
|
+
named field mappings, not positional arrays.
|
|
59
58
|
Prefixed values (scad:value and other Annotation FQNs) are not validated today.
|
|
60
59
|
TODO: a matching prefixed type (scad:type for scad:value) so each facet can be
|
|
61
60
|
checked in its target language. Message is the thrown Error text. Expressions,
|
|
62
61
|
interpolation, unions, StructType, and EnumType are skipped.
|
|
63
|
-
|
|
62
|
+
|
|
64
63
|
validateInstances:
|
|
65
64
|
• BML_UNKNOWN_TYPE — composition instance typeFqn not in TypeRegistry
|
|
66
65
|
• BML_UNKNOWN_PROPERTY — instance memberValues key not in effective members (error)
|
|
67
|
-
|
|
66
|
+
|
|
68
67
|
validateGenerics:
|
|
69
68
|
• BML_OPEN_GENERIC_INSTANCE — aggregated domain Block instance still has open genericTypes without bml:generics (not TypeReferenceEntity sugar)
|
|
70
69
|
• BML_GENERICS_DIRECTIVE_NOT_ALLOWED — bml:generics not on a Block instance (including TypeReferenceEntity QName sugar)
|
|
71
70
|
• BML_GENERICS_ARGUMENT_MISMATCH — bml:generics does not match declared genericTypes (including on a non-generic type)
|
|
72
71
|
• BML_MISSING_GENERIC_TYPE_ARGUMENT — directive present but a required argument has no defaultType
|
|
73
72
|
• BML_GENERIC_CONSTRAINT_VIOLATION — argument fails parameter baseType via satisfiesTypeBound
|
|
74
|
-
|
|
73
|
+
|
|
75
74
|
validateVersions:
|
|
76
75
|
• BML_MISSING_VERSION — standalone root block missing effective version (non-framework convention)
|
|
77
76
|
• BML_UNKNOWN_VERSION — bml:version pin does not match registered block version
|
|
78
|
-
|
|
77
|
+
|
|
79
78
|
validateConstraints:
|
|
80
79
|
• BML_CONSTRAINT_VIOLATION — constraint predicate failed
|
|
81
80
|
• BML_CONSTRAINT_UNKNOWN — unrecognized constraint type FQN
|
|
82
81
|
• BML_CONSTRAINT_TARGET_MISMATCH — constraint branch wrong for embed context
|
|
83
|
-
|
|
82
|
+
|
|
84
83
|
bootstrap:
|
|
85
84
|
• BML_BOOTSTRAP_READ_ERROR — file read failure during corpus walk (warning)
|
|
86
85
|
• BML_LIBRARY_RESOLVE_ERROR — Library.bml path or dependency could not be resolved
|
|
87
86
|
• BML_LIBRARY_NESTING_VIOLATION — outer library re-exports inner-only block
|
|
88
|
-
|
|
89
|
-
Diagnostic type: org.blockml.bml.bom.common.Diagnostic
|
|
90
|
-
|
|
87
|
+
|
|
88
|
+
Diagnostic type: org.blockml.bml.bom.common.Diagnostic.
|
|
89
|
+
</documentation>
|
|
91
90
|
<references>
|
|
92
91
|
<see type="fwconfig:FrameworkDiagnosticCodes" relation="Defines" />
|
|
93
92
|
<see type="fwdocumentation:PackageOwnership" relation="ReadNext" />
|
|
94
93
|
</references>
|
|
95
|
-
|
|
96
|
-
</block>
|
|
94
|
+
</fwdocumentation:Diagnostics>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
"
|
|
1
|
+
<!--Framework Documentation — EffectiveMembers
|
|
2
|
+
FQN: org.blockml.bml.framework.documentation.EffectiveMembers-->
|
|
3
|
+
<fwdocumentation:EffectiveMembers xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -32,35 +26,36 @@
|
|
|
32
26
|
xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
|
|
33
27
|
xmlns:doc="org.blockml.bml.documentation">
|
|
34
28
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<is>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
<baseType>
|
|
30
|
+
core:Documentation
|
|
31
|
+
</baseType>
|
|
32
|
+
<is>
|
|
33
|
+
resolveEffectiveMembers and baseType chain merge
|
|
34
|
+
</is>
|
|
35
|
+
<documentation>
|
|
36
|
+
resolveEffectiveMembers(block, registry) merges members[] in order:
|
|
37
|
+
|
|
42
38
|
1. baseType chain (via collectBaseTypeChain) — earliest to latest
|
|
43
39
|
2. contracts[] in declaration order (via resolveContracts) — contract Block members only;
|
|
44
40
|
subBlocks/compositions/embeddedBlocks on contract types are ignored
|
|
45
41
|
3. local block.members — override earlier layers when override=true
|
|
46
|
-
|
|
42
|
+
|
|
47
43
|
collectBaseTypeChain walks block.baseType → registry.get(baseType) until absent or cycle.
|
|
48
44
|
resolveContracts resolves each contracts[] FQN via TypeRegistry; unknown contract →
|
|
49
45
|
BML_UNKNOWN_CONTRACT (validateTypes).
|
|
50
46
|
memberIdentityKey(member) = (namespace ?? "") + ":" + name — collision detection key.
|
|
51
47
|
findLocalMember(block, member) looks up that key in block.members only (not inherited).
|
|
52
|
-
|
|
48
|
+
|
|
53
49
|
Partial merge: later layer replaces only explicitly authored attributes on the member.
|
|
54
50
|
Used by validateTypes (member collision, override rules) and validateConstraints (effective
|
|
55
51
|
PropertyDefinition constraints).
|
|
56
|
-
|
|
57
|
-
EffectiveMemberSet is a runtime view — not stored on Urmodell (BOM SSOT)
|
|
58
|
-
|
|
52
|
+
|
|
53
|
+
EffectiveMemberSet is a runtime view — not stored on Urmodell (BOM SSOT).
|
|
54
|
+
</documentation>
|
|
59
55
|
<references>
|
|
60
56
|
<see type="fwdocumentation:ExpressionParsing" relation="ReadNext" />
|
|
61
57
|
<see type="fwcap:ResolveEffectiveMembers" relation="Defines" />
|
|
62
58
|
<see type="fwcap:ResolveContracts" relation="SeeAlso" />
|
|
63
59
|
<see type="fwcap:FindLocalMember" relation="SeeAlso" />
|
|
64
60
|
</references>
|
|
65
|
-
|
|
66
|
-
</block>
|
|
61
|
+
</fwdocumentation:EffectiveMembers>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
"
|
|
1
|
+
<!--Framework Documentation — ExpressionParsing
|
|
2
|
+
FQN: org.blockml.bml.framework.documentation.ExpressionParsing-->
|
|
3
|
+
<fwdocumentation:ExpressionParsing xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -32,28 +26,33 @@
|
|
|
32
26
|
xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
|
|
33
27
|
xmlns:doc="org.blockml.bml.documentation">
|
|
34
28
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<is>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
<baseType>
|
|
30
|
+
core:Documentation
|
|
31
|
+
</baseType>
|
|
32
|
+
<is>
|
|
33
|
+
parseExpression AST — no Urmodell writeback (B4)
|
|
34
|
+
</is>
|
|
35
|
+
<documentation>
|
|
36
|
+
parseExpression(source) parses expression text into an ExpressionNode AST.
|
|
37
|
+
parseInterpolatedText(source) scans Text for unescaped ${} holes (restricted
|
|
38
|
+
profile). `\${` is a literal `${`; `\\${` is one `\` plus a hole (odd/even
|
|
39
|
+
backslashes immediately before `$`). Lookup is the same as full expressions:
|
|
40
|
+
size ≡ #this.size, this ≡ #this.this.
|
|
43
41
|
Returns ParseExpressionOutcome: { ok: true, result } | { ok: false, error }.
|
|
44
|
-
|
|
42
|
+
Empty expression text → BML_EXPRESSION_PARSE_ERROR (write `\${ }` for literal
|
|
43
|
+
delimiter characters).
|
|
44
|
+
|
|
45
45
|
Parser stores ExpressionValue.raw / InterpolatedTextValue.raw only (B4).
|
|
46
46
|
validateTypes re-parses at validation time and emits BML_EXPRESSION_PARSE_ERROR
|
|
47
47
|
or BML_EXPR_NOT_ALLOWED_IN_INTERPOLATION on failure.
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
AST node kinds: literal, array, object, property, call, binary, interpolated.
|
|
50
50
|
Optional resultTypeFqn on ParseExpressionResult for typed expression metadata.
|
|
51
|
-
|
|
52
|
-
Expression AST is a Stage-2 utility — never written back to Urmodell member values
|
|
53
|
-
|
|
51
|
+
|
|
52
|
+
Expression AST is a Stage-2 utility — never written back to Urmodell member values.
|
|
53
|
+
</documentation>
|
|
54
54
|
<references>
|
|
55
55
|
<see type="fwdocumentation:ConstraintValidation" relation="ReadNext" />
|
|
56
56
|
<see type="fwexpression:ExpressionNode" relation="Defines" />
|
|
57
57
|
</references>
|
|
58
|
-
|
|
59
|
-
</block>
|
|
58
|
+
</fwdocumentation:ExpressionParsing>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
"
|
|
1
|
+
<!--Framework Documentation — Introduction
|
|
2
|
+
FQN: org.blockml.bml.framework.documentation.Introduction-->
|
|
3
|
+
<fwdocumentation:Introduction xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -32,28 +26,29 @@
|
|
|
32
26
|
xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
|
|
33
27
|
xmlns:doc="org.blockml.bml.documentation">
|
|
34
28
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<is>
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
<baseType>
|
|
30
|
+
core:Documentation
|
|
31
|
+
</baseType>
|
|
32
|
+
<is>
|
|
33
|
+
Purpose and scope of the Framework utilities package
|
|
34
|
+
</is>
|
|
35
|
+
<documentation>
|
|
36
|
+
The @blockml/framework package provides Stage-2 framework utilities: TypeRegistry,
|
|
41
37
|
bootstrapTypeRegistry, forkBom, resolveEffectiveMembers, parseExpression, validateTypes,
|
|
42
38
|
and validateConstraints.
|
|
43
|
-
|
|
39
|
+
|
|
44
40
|
This library (org.blockml.bml.framework.*) is the SSOT. TypeScript in
|
|
45
41
|
packages/framework/src/ implements it. Parity tests in packages/framework/test/
|
|
46
42
|
verify BML ↔ TS alignment.
|
|
47
|
-
|
|
43
|
+
|
|
48
44
|
Stage-2 placement: after parse (Stage 1) and before render/compile targets.
|
|
49
45
|
Consumed by @blockml/validator (orchestrator) and @blockml/cli (bootstrap host).
|
|
50
|
-
|
|
46
|
+
|
|
51
47
|
Language BML corpus remains in npm @blockml/core (node_modules). Framework utilities
|
|
52
|
-
operate on BomDocument (Urmodell) from @blockml/bom — they do not redefine meta-model blocks
|
|
53
|
-
|
|
48
|
+
operate on BomDocument (Urmodell) from @blockml/bom — they do not redefine meta-model blocks.
|
|
49
|
+
</documentation>
|
|
54
50
|
<references>
|
|
55
51
|
<see type="fwdocumentation:LayerSeparation" relation="ReadNext" />
|
|
56
52
|
<see type="bomdocumentation:Introduction" relation="SeeAlso" />
|
|
57
53
|
</references>
|
|
58
|
-
|
|
59
|
-
</block>
|
|
54
|
+
</fwdocumentation:Introduction>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
"
|
|
1
|
+
<!--Framework Documentation — LayerSeparation
|
|
2
|
+
FQN: org.blockml.bml.framework.documentation.LayerSeparation-->
|
|
3
|
+
<fwdocumentation:LayerSeparation xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -32,31 +26,32 @@
|
|
|
32
26
|
xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
|
|
33
27
|
xmlns:doc="org.blockml.bml.documentation">
|
|
34
28
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<is>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
<baseType>
|
|
30
|
+
core:Documentation
|
|
31
|
+
</baseType>
|
|
32
|
+
<is>
|
|
33
|
+
Framework vs BOM vs parser vs validator vs core
|
|
34
|
+
</is>
|
|
35
|
+
<documentation>
|
|
36
|
+
Five layers relevant to framework utilities:
|
|
37
|
+
|
|
42
38
|
org.blockml.bml.bom.* (@blockml/bom) — Urmodell data structures (BomDocument, …).
|
|
43
39
|
ValidateOptions, ValidateResult, TypeRegistryReader (B26) live here.
|
|
44
|
-
|
|
40
|
+
|
|
45
41
|
org.blockml.bml.framework.* (this package) — TypeRegistry, fork/resolve/validate utilities,
|
|
46
42
|
parseExpression AST (Stage 2). Does not own validate() orchestration.
|
|
47
|
-
|
|
43
|
+
|
|
48
44
|
org.blockml.bml.compiler.parser.* (@blockml/parser) — BML → BomDocument (Stage 1).
|
|
49
45
|
bootstrapTypeRegistry calls parse() on corpus files.
|
|
50
|
-
|
|
46
|
+
|
|
51
47
|
org.blockml.bml.compiler.validator.* (@blockml/validator) — validate() entry point;
|
|
52
48
|
orchestrates framework utilities on a pragmatic fork.
|
|
53
|
-
|
|
49
|
+
|
|
54
50
|
org.blockml.bml.definition.* (@blockml/core) — BML meta-model corpus (npm).
|
|
55
|
-
Framework reads Definition types via TypeRegistry; does not duplicate grammar blocks
|
|
56
|
-
|
|
51
|
+
Framework reads Definition types via TypeRegistry; does not duplicate grammar blocks.
|
|
52
|
+
</documentation>
|
|
57
53
|
<references>
|
|
58
54
|
<see type="fwdocumentation:ArchitectureOverview" relation="ReadNext" />
|
|
59
55
|
<see type="bomdocumentation:LayerSeparation" relation="SeeAlso" />
|
|
60
56
|
</references>
|
|
61
|
-
|
|
62
|
-
</block>
|
|
57
|
+
</fwdocumentation:LayerSeparation>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
"
|
|
1
|
+
<!--Framework Documentation — PackageOwnership
|
|
2
|
+
FQN: org.blockml.bml.framework.documentation.PackageOwnership-->
|
|
3
|
+
<fwdocumentation:PackageOwnership xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -32,28 +26,29 @@
|
|
|
32
26
|
xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
|
|
33
27
|
xmlns:doc="org.blockml.bml.documentation">
|
|
34
28
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<is>
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
<baseType>
|
|
30
|
+
core:Documentation
|
|
31
|
+
</baseType>
|
|
32
|
+
<is>
|
|
33
|
+
Toolchain package responsibilities for framework utilities
|
|
34
|
+
</is>
|
|
35
|
+
<documentation>
|
|
36
|
+
@blockml/framework — TypeRegistry, bootstrap, forkBom, resolveEffectiveMembers,
|
|
41
37
|
parseExpression, validateTypes, validateConstraints. Owns this BML library.
|
|
42
|
-
|
|
38
|
+
|
|
43
39
|
@blockml/bom — Urmodell types, ValidateOptions/ValidateResult, TypeRegistryReader,
|
|
44
40
|
Diagnostic. Framework consumes; does not redefine.
|
|
45
|
-
|
|
41
|
+
|
|
46
42
|
@blockml/parser — parse() used during bootstrap only.
|
|
47
|
-
|
|
43
|
+
|
|
48
44
|
@blockml/validator — validate() orchestrator; calls framework utilities.
|
|
49
|
-
|
|
45
|
+
|
|
50
46
|
@blockml/core (npm) — language/meta-model BML corpus; bootstrap source.
|
|
51
|
-
|
|
52
|
-
@blockml/cli — TypeRegistry bootstrap host and validate/compile orchestration
|
|
53
|
-
|
|
47
|
+
|
|
48
|
+
@blockml/cli — TypeRegistry bootstrap host and validate/compile orchestration.
|
|
49
|
+
</documentation>
|
|
54
50
|
<references>
|
|
55
51
|
<see type="fwdocumentation:ScopeExclusions" relation="ReadNext" />
|
|
56
52
|
<see type="bomdocumentation:PackageOwnership" relation="SeeAlso" />
|
|
57
53
|
</references>
|
|
58
|
-
|
|
59
|
-
</block>
|
|
54
|
+
</fwdocumentation:PackageOwnership>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
"
|
|
1
|
+
<!--Framework Documentation — PublicApi
|
|
2
|
+
FQN: org.blockml.bml.framework.documentation.PublicApi-->
|
|
3
|
+
<fwdocumentation:PublicApi xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -32,13 +26,16 @@
|
|
|
32
26
|
xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
|
|
33
27
|
xmlns:doc="org.blockml.bml.documentation">
|
|
34
28
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<is>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
<baseType>
|
|
30
|
+
core:Documentation
|
|
31
|
+
</baseType>
|
|
32
|
+
<is>
|
|
33
|
+
Framework public exports from index.ts
|
|
34
|
+
</is>
|
|
35
|
+
<documentation>
|
|
36
|
+
<![CDATA[
|
|
37
|
+
Public exports from @blockml/framework (packages/framework/src/index.ts):
|
|
38
|
+
|
|
42
39
|
TypeRegistry — class; register/get/has/keys/size/withOverlay on BomDocument index
|
|
43
40
|
bootstrapTypeRegistry(options?) → BootstrapResult
|
|
44
41
|
bootstrapFullProjectRegistry({ rootDir, srcDir?, libraries? }) → BootstrapResult
|
|
@@ -70,14 +67,14 @@
|
|
|
70
67
|
validateConstraints(document, registry) → Diagnostic[]
|
|
71
68
|
getPropertyNumericValue(property) → number | undefined
|
|
72
69
|
isLiteralValue(value) → boolean
|
|
73
|
-
|
|
70
|
+
|
|
74
71
|
Types: BootstrapResult, BootstrapTrace, BootstrapOptions, ExpressionNode, ParseExpressionResult, ParseExpressionOutcome
|
|
75
|
-
|
|
76
|
-
Not exported from index: getLiteralNumericValue (internal helper in validate-types.ts).
|
|
77
|
-
|
|
72
|
+
|
|
73
|
+
Not exported from index: getLiteralNumericValue (internal helper in validate-types.ts).
|
|
74
|
+
]]>
|
|
75
|
+
</documentation>
|
|
78
76
|
<references>
|
|
79
77
|
<see type="fwdocumentation:TypeRegistryBootstrap" relation="ReadNext" />
|
|
80
78
|
<see type="bomapi:TypeRegistryReader" relation="SeeAlso" />
|
|
81
79
|
</references>
|
|
82
|
-
|
|
83
|
-
</block>
|
|
80
|
+
</fwdocumentation:PublicApi>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
"
|
|
1
|
+
<!--Framework Documentation — ScopeExclusions
|
|
2
|
+
FQN: org.blockml.bml.framework.documentation.ScopeExclusions-->
|
|
3
|
+
<fwdocumentation:ScopeExclusions xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -32,24 +26,25 @@
|
|
|
32
26
|
xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
|
|
33
27
|
xmlns:doc="org.blockml.bml.documentation">
|
|
34
28
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<is>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
<baseType>
|
|
30
|
+
core:Documentation
|
|
31
|
+
</baseType>
|
|
32
|
+
<is>
|
|
33
|
+
Explicit out-of-scope for the framework package
|
|
34
|
+
</is>
|
|
35
|
+
<documentation>
|
|
36
|
+
Out of scope for @blockml/framework:
|
|
37
|
+
|
|
42
38
|
• parse() / serialize() public entry points — @blockml/parser / @blockml/serializer
|
|
43
39
|
• validate() orchestration — @blockml/validator
|
|
44
40
|
• CLI / file orchestration — @blockml/cli
|
|
45
41
|
• Render target emit — @blockml/compiler / domain packages
|
|
46
42
|
• Language BML block authorship — @blockml/core (npm)
|
|
47
43
|
• BomBuilder (V3) — future; framework accepts its output types only
|
|
48
|
-
|
|
49
|
-
In scope: Stage-2 utilities on BomDocument with TypeRegistry-backed semantic checks
|
|
50
|
-
|
|
44
|
+
|
|
45
|
+
In scope: Stage-2 utilities on BomDocument with TypeRegistry-backed semantic checks.
|
|
46
|
+
</documentation>
|
|
51
47
|
<references>
|
|
52
48
|
<see type="fwdocumentation:Introduction" relation="SeeAlso" />
|
|
53
49
|
</references>
|
|
54
|
-
|
|
55
|
-
</block>
|
|
50
|
+
</fwdocumentation:ScopeExclusions>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
"
|
|
1
|
+
<!--Framework Documentation — TypeRegistryBootstrap
|
|
2
|
+
FQN: org.blockml.bml.framework.documentation.TypeRegistryBootstrap-->
|
|
3
|
+
<fwdocumentation:TypeRegistryBootstrap xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -32,16 +26,18 @@
|
|
|
32
26
|
xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
|
|
33
27
|
xmlns:doc="org.blockml.bml.documentation">
|
|
34
28
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<is>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
<baseType>
|
|
30
|
+
core:Documentation
|
|
31
|
+
</baseType>
|
|
32
|
+
<is>
|
|
33
|
+
defaultBootstrapPaths and bootstrapTypeRegistry
|
|
34
|
+
</is>
|
|
35
|
+
<documentation>
|
|
36
|
+
bootstrapTypeRegistry(options?) supports two modes:
|
|
37
|
+
|
|
42
38
|
corpus (default) — walks options.paths (or defaultBootstrapPaths()) for all .bml files,
|
|
43
39
|
parses via @blockml/parser parse(), registers each document root block.
|
|
44
|
-
|
|
40
|
+
|
|
45
41
|
library — when options.libraryPaths is set, resolves each Library.bml dependency graph
|
|
46
42
|
(dependencies, subLibraries) in order, then registers blocks from each library blocks root
|
|
47
43
|
except trees already covered by options.paths (srcDir / corpus). Missing Library path →
|
|
@@ -50,43 +46,42 @@
|
|
|
50
46
|
BML_LIBRARY_NESTING_VIOLATION. Duplicate files of the same type FQN are resolved by
|
|
51
47
|
source priority: a path not under node_modules (workspace / project sources) wins over
|
|
52
48
|
an npm copy; same-origin last write wins. The losing file is not compared and is not kept.
|
|
53
|
-
|
|
49
|
+
|
|
54
50
|
defaultBootstrapPaths(rootDir?) returns BlockML srcDir roots for production
|
|
55
51
|
npm dependencies (package.json dependencies + optionalDependencies) of the nearest
|
|
56
52
|
package, resolved via node_modules walk-up. Used as corpus fallback when no paths
|
|
57
53
|
are given. A BlockML package is identified by blockml.library or blockml.config.json;
|
|
58
54
|
its source root is srcDir (default "blocks", override only in that package's
|
|
59
55
|
blockml.config.json).
|
|
60
|
-
|
|
56
|
+
|
|
61
57
|
resolveLibrarySeeds(rootDir, extras?) prepends package.json blockml.library, then
|
|
62
58
|
extras (config.libraries / --libraries), deduped by realpath.
|
|
63
|
-
|
|
59
|
+
|
|
64
60
|
bootstrapFullProjectRegistry({ rootDir, srcDir?, libraries? }) is the shared
|
|
65
61
|
entry point for `blockml validate --all`, `@blockml/search`, and `@blockml/graph`. It sets
|
|
66
62
|
corpus paths to projectSourceRoots (this package srcDir plus local packages/*
|
|
67
63
|
BlockML modules) and library seeds to resolveLibrarySeeds, then calls
|
|
68
64
|
bootstrapTypeRegistry. The resulting registry is the effective BML corpus:
|
|
69
65
|
local project files plus the library graph including npm BlockML packages.
|
|
70
|
-
|
|
66
|
+
|
|
71
67
|
bootstrapTypeRegistry also indexes Library.bml under all BlockML packages found in
|
|
72
68
|
workspace packages/ and node_modules along the directory walk (FQN search space).
|
|
73
69
|
Local srcDir and workspace packages are indexed before node_modules.
|
|
74
70
|
resolveDepCandidate / findLibraryFileForType pick workspace over npm when the same
|
|
75
71
|
Library type FQN exists in both (Core dogfooding against an installed copy).
|
|
76
|
-
|
|
72
|
+
|
|
77
73
|
BootstrapResult: { registry, diagnostics, exportsByLibrary?, trace? }
|
|
78
74
|
trace lists corpusPaths, seeds, searchRoots (index only), librariesVisited, and
|
|
79
75
|
skippedCoveredRoots. Read errors emit BML_BOOTSTRAP_READ_ERROR (warning). Parse
|
|
80
76
|
diagnostics are collected but do not stop registration of successfully parsed
|
|
81
77
|
documents.
|
|
82
|
-
|
|
78
|
+
|
|
83
79
|
Hosts (@blockml/cli, @blockml/validator) may inject a pre-built TypeRegistry via
|
|
84
80
|
ValidateOptions.typeRegistry instead of bootstrapping. ValidateOptions.libraryPaths
|
|
85
|
-
selects library mode when typeRegistry is omitted
|
|
86
|
-
|
|
81
|
+
selects library mode when typeRegistry is omitted.
|
|
82
|
+
</documentation>
|
|
87
83
|
<references>
|
|
88
84
|
<see type="fwdocumentation:EffectiveMembers" relation="ReadNext" />
|
|
89
85
|
<see type="fwcap:BootstrapTypeRegistry" relation="Defines" />
|
|
90
86
|
</references>
|
|
91
|
-
|
|
92
|
-
</block>
|
|
87
|
+
</fwdocumentation:TypeRegistryBootstrap>
|