GSET
Reference

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

MessageCauseFix
gset: cannot read <file>: No such file or directorypath typocheck the path
unknown flag / targetclap rejected the argumentscheck gset transpile --help

These exit with code 1.

2. Target backend errors

MessageCauseFix
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:7

Anything 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:1

The 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 symptomLikely causeFix
Go compile errorsa construct lowered to typeless Goannotate the source so inference has a type
command not found: goruntime not installedinstall 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.go

Debugging tips

  • --verbose prints diagnostics even when there are none.
  • --keep preserves the generated temp file for inspection after gset run.
  • GSET_DEBUG=1 shows debug logging to stderr.

If GSET produces a panic, that's a genuine bug — file an issue.

On this page