Errors
What each error category means and how to fix it.
GSET separates its failure modes. Knowing which one you're in fixes it fastest.
1. CLI and file errors
| Message | Cause | Fix |
|---|---|---|
gset: cannot read <file>: No such file or directory | path typo | check the path |
| unknown flag / target | clap rejected the arguments | check gset transpile --help |
These exit with code 1.
2. Target backend errors
| Message | Cause | Fix |
|---|---|---|
gset: no backend for target \python`; supported: go` | the backend isn't implemented yet (M2) | use -t go, or wait for the planned backend |
These exit with code 2.
3. Parse / lowering errors
Message: error: <what> [gset-syntax] at <file>:<line>:<col>, e.g.:
error: missing `)` [gset-syntax] at fib.py:1:7Anything the grammar cannot parse is reported with a source span before any output is produced. These exit with code 1.
4. Diagnostic warnings
Not failures — but worth reading:
warning: 5 expression(s) have no inferred type; backends will pick a default [gset-untyped] at fib.py:1:1The semantic pass leaves genuinely dynamic code as Type::Unknown. Without a known type, the backend picks a default. Use explicit annotations to get typed output:
def fib(n: int) -> int:
...5. Execution errors (gset run)
The target compiler caught something in the generated code. This is the normal feedback loop:
| Generated-code symptom | Likely cause | Fix |
|---|---|---|
| Go compile errors | a construct lowered to typeless Go | annotate the source so inference has a type |
command not found: go | runtime not installed | install the Go toolchain |
Inspect the generated code to confirm before changing your source:
gset transpile fib.py -t go -o fib.go && go vet fib.goDebugging tips
--verboseprints diagnostics even when there are none.--keeppreserves the generated temp file for inspection aftergset run.GSET_DEBUG=1shows debug logging to stderr.
If GSET produces a panic, that's a genuine bug — file an issue.