Help us shape the future of Go! Take the 2026 Go Developer Survey

construct_invocation

command
v0.29.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Command construct_invocation migrates the authored .memql tree from the legacy call forms to the kind-prefixed construct-invocation forms introduced in Story 2 (#2324) of epic #2322. It is the executable backend for Story 3 (#2326): the tree-wide invocation migration.

It is deterministic, idempotent and re-runnable. Running it a second time against an already-migrated tree produces ZERO further edits.

Forms migrated (see docs / the Story 3 brief for the full contract):

FORM A  (expression position)   name({ k: v })      -> kind name(k: v)
                                name({})            -> kind name()
                                name()              -> kind name()        (registry calls get a kind prefix even without an object wrapper)
FORM B  (automation step, already kind-prefixed, block args)
                                logic foo { k: v }   -> logic foo(k: v)
FORM C  (automation step, bare construct name, block args)
                                createDatabase { k: v } -> mutation createDatabase(k: v)
spec/trait stringly call         spec("name")        -> spec name
embedded @handler query="..."    string content is migrated through the same FORM A rules

NOT migrated (out of scope, owned by Story 4): the versioned action step form action("id@ver") { args { ... } } is left untouched.

Names that are language primitives (the parser's CallableBuiltins / Accessors / KeywordFuncs / Directives / RelationshipWrappers / Retired sets, plus engine helpers and control flow) and any call preceded by `.` (a collection/lambda method) are never prefixed. A called name that is neither in the construct registry nor a known primitive is left bare and LOGGED as a warning for review.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL