Priority
Medium-high — stabilization, tooling completeness, and long-term language maintainability.
Context
.gwdk sources now combine or reference several mini-languages and host languages:
- metadata declarations;
- route syntax;
- build records and build expressions;
- paths records;
- view markup;
- client expressions/statements;
- server declarations;
- inline CSS;
- JavaScript/TypeScript asset declarations;
- inline and targeted Go blocks;
- addon-defined Go-block targets.
The build-expression surface already includes arithmetic, boolean logic, comparisons, lists, objects, comprehensions, reductions, field/index access, and deterministic transform rules.
Problem
Every new source-language feature multiplies the amount of parser, formatter, diagnostics, IR, LSP, conformance, documentation, and generated-output behavior that must stay consistent.
The current language direction risks creating several partial languages inside one file instead of keeping computation and integration in ordinary Go packages.
Specific risks:
- Build expressions duplicate parts of Go while having separate semantics.
- TypeScript transform-only behavior can look like TypeScript support without providing normal type-checking guarantees.
- Inline Go blocks reduce ordinary editor/toolchain ergonomics compared with normal
.go files.
- Feature growth makes v1 compatibility harder because syntax and semantics stabilize before boundaries are clear.
Proposed direction
Define a v1 language budget and feature gate anything outside it.
A conservative v1 budget could be:
- declarative package/page/component/layout structure;
- routes, guards, metadata, and explicit bindings;
- markup with safe interpolation;
- minimal display expressions;
- computation in ordinary Go functions and packages;
- addon integrations through explicit versioned contracts rather than arbitrary source-language growth.
Any new expression or block feature should require a full contract covering grammar, parser, formatter, diagnostics, IR, LSP, docs, conformance corpus, and generated-output behavior.
Acceptance criteria
Related
Priority
Medium-high — stabilization, tooling completeness, and long-term language maintainability.
Context
.gwdksources now combine or reference several mini-languages and host languages:The build-expression surface already includes arithmetic, boolean logic, comparisons, lists, objects, comprehensions, reductions, field/index access, and deterministic transform rules.
Problem
Every new source-language feature multiplies the amount of parser, formatter, diagnostics, IR, LSP, conformance, documentation, and generated-output behavior that must stay consistent.
The current language direction risks creating several partial languages inside one file instead of keeping computation and integration in ordinary Go packages.
Specific risks:
.gofiles.Proposed direction
Define a v1 language budget and feature gate anything outside it.
A conservative v1 budget could be:
Any new expression or block feature should require a full contract covering grammar, parser, formatter, diagnostics, IR, LSP, docs, conformance corpus, and generated-output behavior.
Acceptance criteria
Related
internal/parser#673 — Move semantic validation and asset identity planning out ofinternal/parser