Issue #115: Build-time arguments on a dsl block (dsl sqlite(schema: app) { … } eod)

Open and answer this issue on GitHub.

language, libraries, ready · opened 2026-09-30 · updated 2026-10-06 · 1 comment

Step 2 of ADR-143 §5. A dsl block takes build-time arguments, named, no ;, resolved from comptime values. The driver’s grammar then reads the schema with its own DDL grammar and refuses a missing column at the query.

Open question that decides the spelling (on docs/open-decisions.md): how a schema is bound while the program is built. ADR-143 D3 and Part III 17.1 write let app = comptime asset("schema.sql"), which the language’s own rules refuse (a let is a statement; a build-time value is declared comptime NAME: T = …, Part II 7, ADR-116). Recommendation: comptime APP: db::Schema = asset("schema.sql").

Comments

keywan-ghadami, 2026-10-05

The spelling is decided: comptime APP = asset("schema.sql") (ADR-287 D20)

How it was decided

Changed (0.0.508, 779b9e8)

To build (for this issue: the dsl block’s build-time arguments)

  1. dsl sqlite(schema: APP) { … } eod parses: named arguments in parentheses after the grammar’s name, no ; (ADR-299 D3, ADR-133).
  2. Each argument resolves to a comptime of the surrounding scope (item level or the body). A name that is not a comptime, for example a let, is refused at the block.
  3. The grammar declares which arguments it takes and their types. A missing or unknown argument is refused at the block, in the grammar’s words.
  4. Tests:
    • a block naming APP reaches the grammar with the schema’s text;
    • let s = "…"; dsl sqlite(schema: s) is refused;
    • two blocks naming APP share one schema (D11).

Generated by Claude Code

Back to Open Issues