@blockml/compiler 0.8.0 → 0.8.1
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 +1 -1
- package/blocks/org/blockml/bml/compiler/runtime/capability/CompileBomToOutput.bml +10 -2
- package/blocks/org/blockml/bml/compiler/runtime/documentation/ArchitectureOverview.bml +2 -2
- package/blocks/org/blockml/bml/compiler/runtime/documentation/CompileIO.bml +11 -4
- package/blocks/org/blockml/bml/compiler/runtime/documentation/CompileScopeRules.bml +13 -5
- package/blocks/org/blockml/bml/compiler/runtime/documentation/DesignDecisions.bml +13 -3
- package/blocks/org/blockml/bml/compiler/runtime/documentation/Diagnostics.bml +14 -4
- package/blocks/org/blockml/bml/compiler/runtime/documentation/ExternalTargetContract.bml +4 -4
- package/blocks/org/blockml/bml/compiler/runtime/documentation/Introduction.bml +2 -2
- package/blocks/org/blockml/bml/compiler/runtime/documentation/LayerSeparation.bml +3 -3
- package/blocks/org/blockml/bml/compiler/runtime/documentation/PackageOwnership.bml +2 -2
- package/blocks/org/blockml/bml/compiler/runtime/documentation/PublicApi.bml +4 -4
- package/blocks/org/blockml/bml/compiler/runtime/documentation/RenderContextRules.bml +12 -5
- package/blocks/org/blockml/bml/compiler/runtime/documentation/TargetRegistry.bml +12 -5
- package/blocks/org/blockml/bml/compiler/runtime/documentation/V1Scope.bml +1 -1
- package/package.json +5 -5
|
@@ -30,11 +30,19 @@
|
|
|
30
30
|
<baseType>core:Capability</baseType>
|
|
31
31
|
<is>BOM-first Stage-3 sugar with required TypeRegistry</is>
|
|
32
32
|
|
|
33
|
-
<documentation>
|
|
33
|
+
<documentation>
|
|
34
|
+
# BOM-first Stage-3 sugar with required TypeRegistry
|
|
35
|
+
|
|
36
|
+
Renders an existing BomDocument without re-parse or bootstrap.
|
|
37
|
+
|
|
34
38
|
Requires CompileBomOptions.typeRegistry (BML_MISSING_TYPE_REGISTRY when absent).
|
|
39
|
+
|
|
35
40
|
Document scope only — target.accepts must include document.
|
|
41
|
+
|
|
36
42
|
Registry is passed through unchanged; host owns registry contents.
|
|
37
|
-
|
|
43
|
+
|
|
44
|
+
Synthetic CompileRequest uses scope kind document and optional targetOptions.
|
|
45
|
+
</documentation>
|
|
38
46
|
|
|
39
47
|
<references>
|
|
40
48
|
<see type="runcap:CompileToOutput" relation="SeeAlso" />
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
bootstrapForScope (document parse/register or framework bootstrapTypeRegistry) →
|
|
43
43
|
document ValidateRegistryDocuments → BuildRenderSession → CreateRenderContext → render.</documentation>
|
|
44
44
|
<references>
|
|
45
|
-
<see type="rundocumentation:V1Scope" relation="ReadNext"
|
|
46
|
-
<see type="runcap:CompileToOutput" relation="SeeAlso"
|
|
45
|
+
<see type="rundocumentation:V1Scope" relation="ReadNext" />
|
|
46
|
+
<see type="runcap:CompileToOutput" relation="SeeAlso" />
|
|
47
47
|
</references>
|
|
48
48
|
|
|
49
49
|
</block>
|
|
@@ -31,14 +31,21 @@
|
|
|
31
31
|
<baseType>core:Documentation</baseType>
|
|
32
32
|
<is>Compile I/O model (C4)</is>
|
|
33
33
|
|
|
34
|
-
<documentation>
|
|
34
|
+
<documentation>
|
|
35
|
+
# Compile I/O model (C4)
|
|
36
|
+
|
|
37
|
+
C4: BlockML has no mandatory input↔output cardinality. Targets decide how many files
|
|
35
38
|
(including zero) and may attach side fields on RenderOutput subtypes.
|
|
39
|
+
|
|
36
40
|
Hosts write files; the compiler returns opaque RenderOutput.
|
|
41
|
+
|
|
37
42
|
MachineBlocks 1 BML → 1 SCAD is a domain convention, not a compiler rule.
|
|
38
|
-
|
|
43
|
+
|
|
44
|
+
TypeRegistry population follows resolved scope (document vs library vs corpus), not a fixed I/O map.
|
|
45
|
+
</documentation>
|
|
39
46
|
<references>
|
|
40
|
-
<see type="rundocumentation:CompileScopeRules" relation="ReadNext"
|
|
41
|
-
<see type="runapi:RenderOutput" relation="SeeAlso"
|
|
47
|
+
<see type="rundocumentation:CompileScopeRules" relation="ReadNext" />
|
|
48
|
+
<see type="runapi:RenderOutput" relation="SeeAlso" />
|
|
42
49
|
</references>
|
|
43
50
|
|
|
44
51
|
</block>
|
|
@@ -31,16 +31,24 @@
|
|
|
31
31
|
<baseType>core:Documentation</baseType>
|
|
32
32
|
<is>Compile scope resolution and accepts (C7)</is>
|
|
33
33
|
|
|
34
|
-
<documentation>
|
|
34
|
+
<documentation>
|
|
35
|
+
# Compile scope resolution and accepts (C7)
|
|
36
|
+
|
|
37
|
+
Kinds: document | library | corpus | auto.
|
|
38
|
+
|
|
35
39
|
ResolveScope: document requires scope.document; library uses libraries then hints.libraries;
|
|
36
40
|
corpus uses roots then hints.roots; auto prefers libraries then roots; else BML_COMPILE_SCOPE_EMPTY.
|
|
41
|
+
|
|
37
42
|
ScopeAccepts: exact kind match, or accepts includes auto and kind is library or corpus.
|
|
43
|
+
|
|
38
44
|
CompileToOutput rejects with BML_TARGET_SCOPE_MISMATCH when ScopeAccepts is false.
|
|
39
|
-
|
|
45
|
+
|
|
46
|
+
Accepts matrix for concrete targets lives in target libraries / CLI TargetCliMatrix — not here.
|
|
47
|
+
</documentation>
|
|
40
48
|
<references>
|
|
41
|
-
<see type="rundocumentation:TargetRegistry" relation="ReadNext"
|
|
42
|
-
<see type="runcap:ResolveScope" relation="SeeAlso"
|
|
43
|
-
<see type="runcap:ScopeAccepts" relation="SeeAlso"
|
|
49
|
+
<see type="rundocumentation:TargetRegistry" relation="ReadNext" />
|
|
50
|
+
<see type="runcap:ResolveScope" relation="SeeAlso" />
|
|
51
|
+
<see type="runcap:ScopeAccepts" relation="SeeAlso" />
|
|
44
52
|
</references>
|
|
45
53
|
|
|
46
54
|
</block>
|
|
@@ -31,17 +31,27 @@
|
|
|
31
31
|
<baseType>core:Documentation</baseType>
|
|
32
32
|
<is>Normative Phase C decisions C1–C7</is>
|
|
33
33
|
|
|
34
|
-
<documentation>
|
|
34
|
+
<documentation>
|
|
35
|
+
# Normative Phase C decisions C1–C7
|
|
36
|
+
|
|
37
|
+
C1 RenderContext = RenderSession plus forked per-node context; internal render API.
|
|
38
|
+
|
|
35
39
|
C2 Facade = compileToOutput(CompileRequest, …); compileBmlToOutput is document sugar;
|
|
36
40
|
compileBomToOutput is BOM-first with required TypeRegistry (no re-parse/bootstrap).
|
|
41
|
+
|
|
37
42
|
C3 Registry has no defaults; hosts register; targets[] bootstrap is CLI config (cross-ref);
|
|
38
43
|
registerTarget validates name, accepts, render.
|
|
44
|
+
|
|
39
45
|
C4 No mandatory input↔output mapping; RenderOutput opaque (files[] base).
|
|
46
|
+
|
|
40
47
|
C5 Incremental build is CLI-only (boundary); not a runtime capability.
|
|
48
|
+
|
|
41
49
|
C6 Thumbnails are CLI-only; not part of RenderOutput.
|
|
42
|
-
|
|
50
|
+
|
|
51
|
+
C7 Scope document | library | corpus | auto; accepts[]; opaque targetOptions.
|
|
52
|
+
</documentation>
|
|
43
53
|
<references>
|
|
44
|
-
<see type="rundocumentation:PackageOwnership" relation="ReadNext"
|
|
54
|
+
<see type="rundocumentation:PackageOwnership" relation="ReadNext" />
|
|
45
55
|
</references>
|
|
46
56
|
|
|
47
57
|
</block>
|
|
@@ -31,17 +31,27 @@
|
|
|
31
31
|
<baseType>core:Documentation</baseType>
|
|
32
32
|
<is>Compiler envelope diagnostic codes</is>
|
|
33
33
|
|
|
34
|
-
<documentation>
|
|
34
|
+
<documentation>
|
|
35
|
+
# Compiler envelope diagnostic codes
|
|
36
|
+
|
|
37
|
+
Runtime-owned codes:
|
|
35
38
|
BML_UNKNOWN_TARGET — getTarget missed.
|
|
39
|
+
|
|
36
40
|
BML_TARGET_SCOPE_MISMATCH — resolved kind not accepted.
|
|
41
|
+
|
|
37
42
|
BML_COMPILE_SCOPE_EMPTY — missing document/libraries/roots or auto empty.
|
|
43
|
+
|
|
38
44
|
BML_MISSING_TYPE_REGISTRY — compileBomToOutput called without typeRegistry.
|
|
45
|
+
|
|
39
46
|
Parse/validate diagnostics are forwarded from parser/validator.
|
|
47
|
+
|
|
40
48
|
success on CompilerResult is false if any diagnostic has severity error.
|
|
41
|
-
|
|
49
|
+
|
|
50
|
+
CLI maps diagnostics to exit codes — not modeled here.
|
|
51
|
+
</documentation>
|
|
42
52
|
<references>
|
|
43
|
-
<see type="rundocumentation:DesignDecisions" relation="ReadNext"
|
|
44
|
-
<see type="runconfig:RuntimeConstants" relation="SeeAlso"
|
|
53
|
+
<see type="rundocumentation:DesignDecisions" relation="ReadNext" />
|
|
54
|
+
<see type="runconfig:RuntimeConstants" relation="SeeAlso" />
|
|
45
55
|
</references>
|
|
46
56
|
|
|
47
57
|
</block>
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
@blockml/lsp (V1) — editor-agnostic stdio language server (blockml-lsp);
|
|
55
55
|
IDE clients connect via LSP. See org.blockml.bml.lsp.documentation.Introduction.</documentation>
|
|
56
56
|
<references>
|
|
57
|
-
<see type="rundocumentation:Diagnostics" relation="ReadNext"
|
|
58
|
-
<see type="runapi:RenderTarget" relation="SeeAlso"
|
|
59
|
-
<see type="runcap:CompileBomToOutput" relation="SeeAlso"
|
|
60
|
-
<see type="rundocumentation:TargetRegistry" relation="SeeAlso"
|
|
57
|
+
<see type="rundocumentation:Diagnostics" relation="ReadNext" />
|
|
58
|
+
<see type="runapi:RenderTarget" relation="SeeAlso" />
|
|
59
|
+
<see type="runcap:CompileBomToOutput" relation="SeeAlso" />
|
|
60
|
+
<see type="rundocumentation:TargetRegistry" relation="SeeAlso" />
|
|
61
61
|
</references>
|
|
62
62
|
|
|
63
63
|
</block>
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
org.blockml.bml.cli.*. Target emit rules live in each target library.
|
|
43
43
|
Parser/validator algorithms live in their own libraries; this package orchestrates them.</documentation>
|
|
44
44
|
<references>
|
|
45
|
-
<see type="rundocumentation:LayerSeparation" relation="ReadNext"
|
|
46
|
-
<see type="runcap:CompileToOutput" relation="SeeAlso"
|
|
45
|
+
<see type="rundocumentation:LayerSeparation" relation="ReadNext" />
|
|
46
|
+
<see type="runcap:CompileToOutput" relation="SeeAlso" />
|
|
47
47
|
</references>
|
|
48
48
|
|
|
49
49
|
</block>
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
|
|
41
41
|
Do not double-maintain CLI command matrices or target particle rules here.</documentation>
|
|
42
42
|
<references>
|
|
43
|
-
<see type="rundocumentation:ArchitectureOverview" relation="ReadNext"
|
|
44
|
-
<see type="cli:Library" relation="SeeAlso"
|
|
45
|
-
<see type="framework:Library" relation="SeeAlso"
|
|
43
|
+
<see type="rundocumentation:ArchitectureOverview" relation="ReadNext" />
|
|
44
|
+
<see type="cli:Library" relation="SeeAlso" />
|
|
45
|
+
<see type="framework:Library" relation="SeeAlso" />
|
|
46
46
|
</references>
|
|
47
47
|
|
|
48
48
|
</block>
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
parser/serializer/validator algorithms; framework TypeRegistry internals;
|
|
40
40
|
target Options and emit; MachineBlocks SCAD NativeBlock.</documentation>
|
|
41
41
|
<references>
|
|
42
|
-
<see type="rundocumentation:ScopeExclusions" relation="ReadNext"
|
|
43
|
-
<see type="cli:Library" relation="SeeAlso"
|
|
42
|
+
<see type="rundocumentation:ScopeExclusions" relation="ReadNext" />
|
|
43
|
+
<see type="cli:Library" relation="SeeAlso" />
|
|
44
44
|
</references>
|
|
45
45
|
|
|
46
46
|
</block>
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
|
|
44
44
|
Modeled as api/*, config/RuntimeConstants, and capability/* on Library.blocks.</documentation>
|
|
45
45
|
<references>
|
|
46
|
-
<see type="rundocumentation:CompileIO" relation="ReadNext"
|
|
47
|
-
<see type="runapi:CompileRequest" relation="SeeAlso"
|
|
48
|
-
<see type="runcap:CompileToOutput" relation="SeeAlso"
|
|
49
|
-
<see type="runapi:RenderTarget" relation="SeeAlso"
|
|
46
|
+
<see type="rundocumentation:CompileIO" relation="ReadNext" />
|
|
47
|
+
<see type="runapi:CompileRequest" relation="SeeAlso" />
|
|
48
|
+
<see type="runcap:CompileToOutput" relation="SeeAlso" />
|
|
49
|
+
<see type="runapi:RenderTarget" relation="SeeAlso" />
|
|
50
50
|
</references>
|
|
51
51
|
|
|
52
52
|
</block>
|
|
@@ -31,17 +31,24 @@
|
|
|
31
31
|
<baseType>core:Documentation</baseType>
|
|
32
32
|
<is>RenderSession and RenderContext (C1)</is>
|
|
33
33
|
|
|
34
|
-
<documentation>
|
|
34
|
+
<documentation>
|
|
35
|
+
# RenderSession and RenderContext (C1)
|
|
36
|
+
|
|
37
|
+
RenderSession is immutable per compile after BuildRenderSession.
|
|
38
|
+
|
|
35
39
|
Stable session fields for registry targets: typeRegistry, sourceFilePath, outputBasePath,
|
|
36
40
|
targetName, scopeKind, libraryPaths?, corpusRoots?.
|
|
41
|
+
|
|
37
42
|
RenderContext holds session + blockFqn + outputRelativePath; child(overrides) forks a new
|
|
38
43
|
context sharing the same session. Per-node fields are for composition/domain renderers;
|
|
39
44
|
registry targets may ignore them and rely on request.scope plus session.
|
|
40
|
-
|
|
45
|
+
|
|
46
|
+
CreateRenderContext defaults empty FQN and relative path for the root call into target.render.
|
|
47
|
+
</documentation>
|
|
41
48
|
<references>
|
|
42
|
-
<see type="rundocumentation:ExternalTargetContract" relation="ReadNext"
|
|
43
|
-
<see type="runcap:BuildRenderSession" relation="SeeAlso"
|
|
44
|
-
<see type="runcap:CreateRenderContext" relation="SeeAlso"
|
|
49
|
+
<see type="rundocumentation:ExternalTargetContract" relation="ReadNext" />
|
|
50
|
+
<see type="runcap:BuildRenderSession" relation="SeeAlso" />
|
|
51
|
+
<see type="runcap:CreateRenderContext" relation="SeeAlso" />
|
|
45
52
|
</references>
|
|
46
53
|
|
|
47
54
|
</block>
|
|
@@ -31,18 +31,25 @@
|
|
|
31
31
|
<baseType>core:Documentation</baseType>
|
|
32
32
|
<is>Target Registry contract (C3)</is>
|
|
33
33
|
|
|
34
|
-
<documentation>
|
|
34
|
+
<documentation>
|
|
35
|
+
# Target Registry contract (C3)
|
|
36
|
+
|
|
37
|
+
In-memory Map of name → RenderTarget. registerTarget overwrites; getTarget may miss;
|
|
35
38
|
clearTargets empties; registeredTargetNames lists keys.
|
|
39
|
+
|
|
36
40
|
No default targets ship in @blockml/compiler. Hosts (CLI bootstrapTargets, tests, browsers)
|
|
37
41
|
call registerTarget before compileToOutput.
|
|
42
|
+
|
|
38
43
|
registerTarget validates: non-empty name; non-empty accepts with only valid CompileScopeKind
|
|
39
44
|
values; render is a function; validateRequest if present is a function. Invalid hosts throw
|
|
40
45
|
(programming error — not a BML authoring diagnostic).
|
|
41
|
-
|
|
46
|
+
|
|
47
|
+
Config targets[] and package loading order are CLI-owned (SeeAlso RuntimeBootstrap).
|
|
48
|
+
</documentation>
|
|
42
49
|
<references>
|
|
43
|
-
<see type="rundocumentation:RenderContextRules" relation="ReadNext"
|
|
44
|
-
<see type="runcap:RegisterTarget" relation="SeeAlso"
|
|
45
|
-
<see type="cli:Library" relation="SeeAlso"
|
|
50
|
+
<see type="rundocumentation:RenderContextRules" relation="ReadNext" />
|
|
51
|
+
<see type="runcap:RegisterTarget" relation="SeeAlso" />
|
|
52
|
+
<see type="cli:Library" relation="SeeAlso" />
|
|
46
53
|
</references>
|
|
47
54
|
|
|
48
55
|
</block>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
V1 does NOT include CLI targets[] bootstrap, file I/O, incremental cache (C5),
|
|
45
45
|
thumbnails (C6), or target-specific emit.</documentation>
|
|
46
46
|
<references>
|
|
47
|
-
<see type="rundocumentation:PublicApi" relation="ReadNext"
|
|
47
|
+
<see type="rundocumentation:PublicApi" relation="ReadNext" />
|
|
48
48
|
</references>
|
|
49
49
|
|
|
50
50
|
</block>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockml/compiler",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "BlockML compiler — facade, target registry, render pipeline",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"test": "vitest run packages/compiler/test"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@blockml/bom": "^0.8.
|
|
35
|
+
"@blockml/bom": "^0.8.1",
|
|
36
36
|
"@blockml/core": "^1.0.6",
|
|
37
|
-
"@blockml/framework": "^0.8.
|
|
38
|
-
"@blockml/parser": "^0.8.
|
|
39
|
-
"@blockml/validator": "^0.8.
|
|
37
|
+
"@blockml/framework": "^0.8.1",
|
|
38
|
+
"@blockml/parser": "^0.8.1",
|
|
39
|
+
"@blockml/validator": "^0.8.1"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=20"
|