@blockml/compiler 0.9.3 → 0.9.5
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/runtime/Library.bml +19 -26
- package/blocks/org/blockml/bml/compiler/runtime/README.bml +14 -21
- package/blocks/org/blockml/bml/compiler/runtime/RuntimeType.bml +16 -18
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileBomOptions.bml +34 -22
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileInput.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileOptions.bml +29 -21
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileRequest.bml +23 -19
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileScope.bml +38 -22
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileScopeKind.bml +33 -21
- package/blocks/org/blockml/bml/compiler/runtime/api/CompilerResult.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/api/RenderContext.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/api/RenderOutput.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/api/RenderOutputFile.bml +23 -19
- package/blocks/org/blockml/bml/compiler/runtime/api/RenderSession.bml +49 -25
- package/blocks/org/blockml/bml/compiler/runtime/api/RenderTarget.bml +33 -21
- package/blocks/org/blockml/bml/compiler/runtime/api/ResolvedScope.bml +33 -21
- package/blocks/org/blockml/bml/compiler/runtime/api/ScopeConfigHints.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/api/ValidateRegistryResult.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/capability/BuildRenderSession.bml +20 -22
- package/blocks/org/blockml/bml/compiler/runtime/capability/ClearTargets.bml +13 -20
- package/blocks/org/blockml/bml/compiler/runtime/capability/CompileBmlToBom.bml +22 -22
- package/blocks/org/blockml/bml/compiler/runtime/capability/CompileBmlToOutput.bml +25 -23
- package/blocks/org/blockml/bml/compiler/runtime/capability/CompileBomToOutput.bml +27 -27
- package/blocks/org/blockml/bml/compiler/runtime/capability/CompileToOutput.bml +28 -24
- package/blocks/org/blockml/bml/compiler/runtime/capability/CreateRenderContext.bml +25 -23
- package/blocks/org/blockml/bml/compiler/runtime/capability/GetTarget.bml +19 -21
- package/blocks/org/blockml/bml/compiler/runtime/capability/RegisterTarget.bml +17 -21
- package/blocks/org/blockml/bml/compiler/runtime/capability/RegisteredTargetNames.bml +16 -19
- package/blocks/org/blockml/bml/compiler/runtime/capability/ResolveScope.bml +25 -23
- package/blocks/org/blockml/bml/compiler/runtime/capability/ScopeAccepts.bml +22 -22
- package/blocks/org/blockml/bml/compiler/runtime/capability/ValidateRegistryDocuments.bml +23 -23
- package/blocks/org/blockml/bml/compiler/runtime/config/RuntimeConstants.bml +39 -23
- package/blocks/org/blockml/bml/compiler/runtime/documentation/ArchitectureOverview.bml +15 -19
- package/blocks/org/blockml/bml/compiler/runtime/documentation/CompileIO.bml +14 -20
- package/blocks/org/blockml/bml/compiler/runtime/documentation/CompileScopeRules.bml +15 -21
- package/blocks/org/blockml/bml/compiler/runtime/documentation/DesignDecisions.bml +17 -23
- package/blocks/org/blockml/bml/compiler/runtime/documentation/Diagnostics.bml +17 -23
- package/blocks/org/blockml/bml/compiler/runtime/documentation/ExternalTargetContract.bml +18 -22
- package/blocks/org/blockml/bml/compiler/runtime/documentation/Introduction.bml +16 -20
- package/blocks/org/blockml/bml/compiler/runtime/documentation/LayerSeparation.bml +15 -19
- package/blocks/org/blockml/bml/compiler/runtime/documentation/PackageOwnership.bml +15 -19
- package/blocks/org/blockml/bml/compiler/runtime/documentation/PublicApi.bml +15 -19
- package/blocks/org/blockml/bml/compiler/runtime/documentation/RenderContextRules.bml +14 -20
- package/blocks/org/blockml/bml/compiler/runtime/documentation/ScopeExclusions.bml +14 -18
- package/blocks/org/blockml/bml/compiler/runtime/documentation/TargetRegistry.bml +14 -20
- package/blocks/org/blockml/bml/compiler/runtime/documentation/V1Scope.bml +15 -19
- package/package.json +6 -6
|
@@ -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
|
+
<!--Compiler Runtime Capability — ValidateRegistryDocuments
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.capability.ValidateRegistryDocuments-->
|
|
3
|
+
<runcap:ValidateRegistryDocuments 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"
|
|
@@ -25,29 +19,35 @@
|
|
|
25
19
|
xmlns:type="org.blockml.bml.type"
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator">
|
|
27
21
|
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<is>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
<baseType>
|
|
23
|
+
core:Capability
|
|
24
|
+
</baseType>
|
|
25
|
+
<is>
|
|
26
|
+
Re-validate BomDocuments in a TypeRegistry
|
|
27
|
+
</is>
|
|
28
|
+
<documentation>
|
|
29
|
+
Dedupes by filePath; optional filePaths filter (undefined = all; empty = none); continueOnError true.
|
|
30
|
+
Returns ValidateRegistryResult: diagnostics, blocksTested (unique filePaths), blocksWithErrors (documents with !success).
|
|
31
|
+
</documentation>
|
|
36
32
|
<references>
|
|
37
33
|
<see type="validator:Library" relation="SeeAlso" />
|
|
38
34
|
<see type="runapi:ValidateRegistryResult" relation="SeeAlso" />
|
|
39
35
|
</references>
|
|
40
|
-
|
|
41
36
|
<properties>
|
|
42
37
|
<typeRegistry type="type:Text">
|
|
43
|
-
<documentation>
|
|
38
|
+
<documentation>
|
|
39
|
+
TypeRegistry. (required)
|
|
40
|
+
</documentation>
|
|
44
41
|
</typeRegistry>
|
|
45
42
|
<filePaths type="type:Text">
|
|
46
|
-
<documentation>
|
|
43
|
+
<documentation>
|
|
44
|
+
Optional path filter. undefined = all documents; empty = none. (optional)
|
|
45
|
+
</documentation>
|
|
47
46
|
</filePaths>
|
|
48
47
|
<result type="runapi:ValidateRegistryResult">
|
|
49
|
-
<documentation>
|
|
48
|
+
<documentation>
|
|
49
|
+
diagnostics, blocksTested, blocksWithErrors. (required)
|
|
50
|
+
</documentation>
|
|
50
51
|
</result>
|
|
51
52
|
</properties>
|
|
52
|
-
|
|
53
|
-
</block>
|
|
53
|
+
</runcap:ValidateRegistryDocuments>
|
|
@@ -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
|
+
<!--Compiler Runtime Config — RuntimeConstants
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.config.RuntimeConstants-->
|
|
3
|
+
<runconfig:RuntimeConstants 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"
|
|
@@ -25,19 +19,41 @@
|
|
|
25
19
|
xmlns:type="org.blockml.bml.type"
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator">
|
|
27
21
|
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<is>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
<baseType>
|
|
23
|
+
runtime:RuntimeType
|
|
24
|
+
</baseType>
|
|
25
|
+
<is>
|
|
26
|
+
Well-known diagnostic codes and scope kind literals
|
|
27
|
+
</is>
|
|
28
|
+
<documentation>
|
|
29
|
+
Codes emitted by ResolveScope and CompileToOutput / CompileBomToOutput.
|
|
30
|
+
Scope kinds mirror CompileScopeKind.
|
|
31
|
+
</documentation>
|
|
35
32
|
<properties>
|
|
36
|
-
<BML_UNKNOWN_TARGET type="type:Text"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
<BML_UNKNOWN_TARGET type="type:Text">
|
|
34
|
+
<documentation>
|
|
35
|
+
Unknown render target name.
|
|
36
|
+
</documentation>
|
|
37
|
+
</BML_UNKNOWN_TARGET>
|
|
38
|
+
<BML_TARGET_SCOPE_MISMATCH type="type:Text">
|
|
39
|
+
<documentation>
|
|
40
|
+
Resolved scope kind not in target.accepts.
|
|
41
|
+
</documentation>
|
|
42
|
+
</BML_TARGET_SCOPE_MISMATCH>
|
|
43
|
+
<BML_COMPILE_SCOPE_EMPTY type="type:Text">
|
|
44
|
+
<documentation>
|
|
45
|
+
Missing document/libraries/roots or auto found nothing.
|
|
46
|
+
</documentation>
|
|
47
|
+
</BML_COMPILE_SCOPE_EMPTY>
|
|
48
|
+
<BML_MISSING_TYPE_REGISTRY type="type:Text">
|
|
49
|
+
<documentation>
|
|
50
|
+
compileBomToOutput requires typeRegistry.
|
|
51
|
+
</documentation>
|
|
52
|
+
</BML_MISSING_TYPE_REGISTRY>
|
|
53
|
+
<SCOPE_KINDS type="type:Text">
|
|
54
|
+
<documentation>
|
|
55
|
+
document, library, corpus, auto
|
|
56
|
+
</documentation>
|
|
57
|
+
</SCOPE_KINDS>
|
|
41
58
|
</properties>
|
|
42
|
-
|
|
43
|
-
</block>
|
|
59
|
+
</runconfig:RuntimeConstants>
|
|
@@ -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
|
+
<!--Compiler Runtime Documentation — ArchitectureOverview
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.ArchitectureOverview-->
|
|
3
|
+
<rundocumentation:ArchitectureOverview 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"
|
|
@@ -26,24 +20,26 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
Modules and compileToOutput data flow
|
|
28
|
+
</is>
|
|
29
|
+
<documentation>
|
|
30
|
+
Public modules map to capabilities:
|
|
35
31
|
types.ts → api/*; target-registry.ts → Register/Get/Clear/RegisteredTargetNames;
|
|
36
32
|
scope.ts → ResolveScope, ScopeAccepts;
|
|
37
33
|
compile-bml-to-bom.ts → CompileBmlToBom, ValidateRegistryDocuments;
|
|
38
34
|
compile-to-output.ts → CompileToOutput (+ sugar);
|
|
39
35
|
render-context.ts → BuildRenderSession, CreateRenderContext.
|
|
40
|
-
|
|
36
|
+
|
|
41
37
|
CompileToOutput pipeline: getTarget → validateRequest? → ResolveScope → ScopeAccepts →
|
|
42
38
|
bootstrapForScope (document parse/register or framework bootstrapTypeRegistry) →
|
|
43
|
-
document ValidateRegistryDocuments → BuildRenderSession → CreateRenderContext → render
|
|
39
|
+
document ValidateRegistryDocuments → BuildRenderSession → CreateRenderContext → render.
|
|
40
|
+
</documentation>
|
|
44
41
|
<references>
|
|
45
42
|
<see type="rundocumentation:V1Scope" relation="ReadNext" />
|
|
46
43
|
<see type="runcap:CompileToOutput" relation="SeeAlso" />
|
|
47
44
|
</references>
|
|
48
|
-
|
|
49
|
-
</block>
|
|
45
|
+
</rundocumentation:ArchitectureOverview>
|
|
@@ -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
|
+
<!--Compiler Runtime Documentation — CompileIO
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.CompileIO-->
|
|
3
|
+
<rundocumentation:CompileIO 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"
|
|
@@ -26,26 +20,26 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
Compile I/O model (C4)
|
|
28
|
+
</is>
|
|
34
29
|
<documentation>
|
|
35
30
|
# Compile I/O model (C4)
|
|
36
|
-
|
|
31
|
+
|
|
37
32
|
C4: BlockML has no mandatory input↔output cardinality. Targets decide how many files
|
|
38
33
|
(including zero) and may attach side fields on RenderOutput subtypes.
|
|
39
|
-
|
|
34
|
+
|
|
40
35
|
Hosts write files; the compiler returns opaque RenderOutput.
|
|
41
|
-
|
|
36
|
+
|
|
42
37
|
MachineBlocks 1 BML → 1 SCAD is a domain convention, not a compiler rule.
|
|
43
|
-
|
|
38
|
+
|
|
44
39
|
TypeRegistry population follows resolved scope (document vs library vs corpus), not a fixed I/O map.
|
|
45
40
|
</documentation>
|
|
46
41
|
<references>
|
|
47
42
|
<see type="rundocumentation:CompileScopeRules" relation="ReadNext" />
|
|
48
43
|
<see type="runapi:RenderOutput" relation="SeeAlso" />
|
|
49
44
|
</references>
|
|
50
|
-
|
|
51
|
-
</block>
|
|
45
|
+
</rundocumentation:CompileIO>
|
|
@@ -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
|
+
<!--Compiler Runtime Documentation — CompileScopeRules
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.CompileScopeRules-->
|
|
3
|
+
<rundocumentation:CompileScopeRules 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"
|
|
@@ -26,23 +20,24 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
Compile scope resolution and accepts (C7)
|
|
28
|
+
</is>
|
|
34
29
|
<documentation>
|
|
35
30
|
# Compile scope resolution and accepts (C7)
|
|
36
|
-
|
|
31
|
+
|
|
37
32
|
Kinds: document | library | corpus | auto.
|
|
38
|
-
|
|
33
|
+
|
|
39
34
|
ResolveScope: document requires scope.document; library uses libraries then hints.libraries;
|
|
40
35
|
corpus uses roots then hints.roots; auto prefers libraries then roots; else BML_COMPILE_SCOPE_EMPTY.
|
|
41
|
-
|
|
36
|
+
|
|
42
37
|
ScopeAccepts: exact kind match, or accepts includes auto and kind is library or corpus.
|
|
43
|
-
|
|
38
|
+
|
|
44
39
|
CompileToOutput rejects with BML_TARGET_SCOPE_MISMATCH when ScopeAccepts is false.
|
|
45
|
-
|
|
40
|
+
|
|
46
41
|
Accepts matrix for concrete targets lives in target libraries / CLI TargetCliMatrix — not here.
|
|
47
42
|
</documentation>
|
|
48
43
|
<references>
|
|
@@ -50,5 +45,4 @@
|
|
|
50
45
|
<see type="runcap:ResolveScope" relation="SeeAlso" />
|
|
51
46
|
<see type="runcap:ScopeAccepts" relation="SeeAlso" />
|
|
52
47
|
</references>
|
|
53
|
-
|
|
54
|
-
</block>
|
|
48
|
+
</rundocumentation:CompileScopeRules>
|
|
@@ -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
|
+
<!--Compiler Runtime Documentation — DesignDecisions
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.DesignDecisions-->
|
|
3
|
+
<rundocumentation:DesignDecisions 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"
|
|
@@ -26,32 +20,32 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
Normative Phase C decisions C1–C7
|
|
28
|
+
</is>
|
|
34
29
|
<documentation>
|
|
35
30
|
# Normative Phase C decisions C1–C7
|
|
36
|
-
|
|
31
|
+
|
|
37
32
|
C1 RenderContext = RenderSession plus forked per-node context; internal render API.
|
|
38
|
-
|
|
33
|
+
|
|
39
34
|
C2 Facade = compileToOutput(CompileRequest, …); compileBmlToOutput is document sugar;
|
|
40
35
|
compileBomToOutput is BOM-first with required TypeRegistry (no re-parse/bootstrap).
|
|
41
|
-
|
|
36
|
+
|
|
42
37
|
C3 Registry has no defaults; hosts register; targets[] bootstrap is CLI config (cross-ref);
|
|
43
38
|
registerTarget validates name, accepts, render.
|
|
44
|
-
|
|
39
|
+
|
|
45
40
|
C4 No mandatory input↔output mapping; RenderOutput opaque (files[] base).
|
|
46
|
-
|
|
41
|
+
|
|
47
42
|
C5 Incremental build is CLI-only (boundary); not a runtime capability.
|
|
48
|
-
|
|
43
|
+
|
|
49
44
|
C6 Thumbnails are CLI-only; not part of RenderOutput.
|
|
50
|
-
|
|
45
|
+
|
|
51
46
|
C7 Scope document | library | corpus | auto; accepts[]; opaque targetOptions.
|
|
52
47
|
</documentation>
|
|
53
48
|
<references>
|
|
54
49
|
<see type="rundocumentation:PackageOwnership" relation="ReadNext" />
|
|
55
50
|
</references>
|
|
56
|
-
|
|
57
|
-
</block>
|
|
51
|
+
</rundocumentation:DesignDecisions>
|
|
@@ -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
|
+
<!--Compiler Runtime Documentation — Diagnostics
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.Diagnostics-->
|
|
3
|
+
<rundocumentation: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"
|
|
@@ -26,32 +20,32 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
Compiler envelope diagnostic codes
|
|
28
|
+
</is>
|
|
34
29
|
<documentation>
|
|
35
30
|
# Compiler envelope diagnostic codes
|
|
36
|
-
|
|
31
|
+
|
|
37
32
|
Runtime-owned codes:
|
|
38
33
|
BML_UNKNOWN_TARGET — getTarget missed.
|
|
39
|
-
|
|
34
|
+
|
|
40
35
|
BML_TARGET_SCOPE_MISMATCH — resolved kind not accepted.
|
|
41
|
-
|
|
36
|
+
|
|
42
37
|
BML_COMPILE_SCOPE_EMPTY — missing document/libraries/roots or auto empty.
|
|
43
|
-
|
|
38
|
+
|
|
44
39
|
BML_MISSING_TYPE_REGISTRY — compileBomToOutput called without typeRegistry.
|
|
45
|
-
|
|
40
|
+
|
|
46
41
|
Parse/validate diagnostics are forwarded from parser/validator.
|
|
47
|
-
|
|
42
|
+
|
|
48
43
|
success on CompilerResult is false if any diagnostic has severity error.
|
|
49
|
-
|
|
44
|
+
|
|
50
45
|
CLI maps diagnostics to exit codes — not modeled here.
|
|
51
46
|
</documentation>
|
|
52
47
|
<references>
|
|
53
48
|
<see type="rundocumentation:DesignDecisions" relation="ReadNext" />
|
|
54
49
|
<see type="runconfig:RuntimeConstants" relation="SeeAlso" />
|
|
55
50
|
</references>
|
|
56
|
-
|
|
57
|
-
</block>
|
|
51
|
+
</rundocumentation: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
|
+
<!--Compiler Runtime Documentation — ExternalTargetContract
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.ExternalTargetContract-->
|
|
3
|
+
<rundocumentation:ExternalTargetContract 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"
|
|
@@ -26,38 +20,40 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
Normative contract for external Stage-3 RenderTargets
|
|
28
|
+
</is>
|
|
29
|
+
<documentation>
|
|
30
|
+
RenderTarget: name, accepts[], optional validateRequest, render(request, ctx) → RenderOutput
|
|
35
31
|
(files[] required; optional rootFiles[] at project root, optional diagnostics[] for CLI merge).
|
|
36
32
|
BOM-first hosts call compileBomToOutput(document, targetName, CompileBomOptions) with a required
|
|
37
33
|
TypeRegistry; no re-parse or bootstrap. Host must ensure the document is discoverable in the
|
|
38
34
|
registry when the target looks up by sourceFilePath or FQN.
|
|
39
|
-
|
|
35
|
+
|
|
40
36
|
Stable RenderSession fields for registry targets: typeRegistry, sourceFilePath, outputBasePath,
|
|
41
37
|
targetName, scopeKind, libraryPaths?, corpusRoots?.
|
|
42
38
|
Per-node RenderContext fields (blockFqn, outputRelativePath, child) are for composition renderers;
|
|
43
39
|
registry targets may ignore them.
|
|
44
|
-
|
|
40
|
+
|
|
45
41
|
Domain-specific options (MachineBlocks lib path, active config profiles, …) live in opaque
|
|
46
42
|
targetOptions on CompileRequest / CompileBomOptions — not on CompileOptions or RenderSession.
|
|
47
43
|
Hosts register targets via registerTarget before compile.
|
|
48
|
-
|
|
44
|
+
|
|
49
45
|
Stage-2 guarantee: hosts should run validate() or validateRegistryDocuments on the corpus
|
|
50
46
|
before emit when targets depend on semantic guarantees (embedded blocks, constraints,
|
|
51
47
|
instance refs). BlockDoc/XSD compile paths may omit full corpus Stage-2 by policy;
|
|
52
48
|
blockml validate remains SSOT for semantic validation.
|
|
53
|
-
|
|
49
|
+
|
|
54
50
|
@blockml/lsp (V1) — editor-agnostic stdio language server (blockml-lsp);
|
|
55
|
-
IDE clients connect via LSP. See org.blockml.bml.lsp.documentation.Introduction
|
|
51
|
+
IDE clients connect via LSP. See org.blockml.bml.lsp.documentation.Introduction.
|
|
52
|
+
</documentation>
|
|
56
53
|
<references>
|
|
57
54
|
<see type="rundocumentation:Diagnostics" relation="ReadNext" />
|
|
58
55
|
<see type="runapi:RenderTarget" relation="SeeAlso" />
|
|
59
56
|
<see type="runcap:CompileBomToOutput" relation="SeeAlso" />
|
|
60
57
|
<see type="rundocumentation:TargetRegistry" relation="SeeAlso" />
|
|
61
58
|
</references>
|
|
62
|
-
|
|
63
|
-
</block>
|
|
59
|
+
</rundocumentation:ExternalTargetContract>
|
|
@@ -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
|
+
<!--Compiler Runtime Documentation — Introduction
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.Introduction-->
|
|
3
|
+
<rundocumentation: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"
|
|
@@ -26,24 +20,26 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
Purpose and scope of the compiler runtime
|
|
28
|
+
</is>
|
|
29
|
+
<documentation>
|
|
30
|
+
The @blockml/compiler package implements the Stage-3 facade and Target Registry.
|
|
35
31
|
Normative entry is compileToOutput (C2). Targets register via registerTarget; the
|
|
36
32
|
registry ships with no defaults (C3). Compile scope kinds and auto resolution are C7.
|
|
37
|
-
|
|
33
|
+
|
|
38
34
|
This library (org.blockml.bml.compiler.runtime.*) is the SSOT. TypeScript in
|
|
39
35
|
packages/compiler/src/ implements it. Tests in packages/compiler/test/ encode contracts.
|
|
40
|
-
|
|
36
|
+
|
|
41
37
|
Host wiring (targets[] bootstrap, file write, exit codes, C5/C6) lives in
|
|
42
38
|
org.blockml.bml.cli.*. Target emit rules live in each target library.
|
|
43
|
-
Parser/validator algorithms live in their own libraries; this package orchestrates them
|
|
39
|
+
Parser/validator algorithms live in their own libraries; this package orchestrates them.
|
|
40
|
+
</documentation>
|
|
44
41
|
<references>
|
|
45
42
|
<see type="rundocumentation:LayerSeparation" relation="ReadNext" />
|
|
46
43
|
<see type="runcap:CompileToOutput" relation="SeeAlso" />
|
|
47
44
|
</references>
|
|
48
|
-
|
|
49
|
-
</block>
|
|
45
|
+
</rundocumentation: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
|
+
<!--Compiler Runtime Documentation — LayerSeparation
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.LayerSeparation-->
|
|
3
|
+
<rundocumentation: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"
|
|
@@ -26,23 +20,25 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
What this library owns versus neighbors
|
|
28
|
+
</is>
|
|
29
|
+
<documentation>
|
|
30
|
+
Layers:
|
|
35
31
|
• org.blockml.bml.compiler.runtime.* (this library) — facade, registry, scope, RenderContext
|
|
36
32
|
• org.blockml.bml.compiler.parser.* / validator.* — Stage 1–2 algorithms
|
|
37
33
|
• org.blockml.bml.framework.* — TypeRegistry bootstrap used by compileToOutput
|
|
38
34
|
• org.blockml.bml.cli.* — config bootstrap, write files, C5/C6, exit codes
|
|
39
35
|
• target libraries — RenderTarget.render and typed targetOptions
|
|
40
|
-
|
|
41
|
-
Do not double-maintain CLI command matrices or target particle rules here
|
|
36
|
+
|
|
37
|
+
Do not double-maintain CLI command matrices or target particle rules here.
|
|
38
|
+
</documentation>
|
|
42
39
|
<references>
|
|
43
40
|
<see type="rundocumentation:ArchitectureOverview" relation="ReadNext" />
|
|
44
41
|
<see type="cli:Library" relation="SeeAlso" />
|
|
45
42
|
<see type="framework:Library" relation="SeeAlso" />
|
|
46
43
|
</references>
|
|
47
|
-
|
|
48
|
-
</block>
|
|
44
|
+
</rundocumentation:LayerSeparation>
|