GSET
Reference

Errors

What each error category means and how to fix it.

GSET separates three failure modes. Knowing which one you're in fixes it fastest.

1. Parse errors

Message: Parse errors: followed by line N: unexpected "..." inside ....

Causes and fixes:

Message hintUsually meansFix
unexpected "}" inside map literala stray { opened a block/map that never closed, or you passed export add(...) (not yet supported)close the brace, or drop the unsupported construct
expected X, got Ysyntax typo (missing brace, missing ))check the reported line

Parse errors exit with code 1 and nothing runs.

2. Transpile errors

Message: target "c" is not supported or similar.

ErrorCauseFix
--target <unsupported>target isn't one of go/python/js/java/rubyuse a supported target
no such filepath typocheck the path

3. Execution errors (gset run)

Message: differs per runtime, e.g. Go's undefined: x, Python's Traceback, node's TypeError.

The target compiler caught something in the generated code. This is the normal GSET feedback loop:

Generated-code symptomLikely GSET causeFix in GSET source
Go undefined: xassignment without var firstvar x = …
Go operator * not defined on interface{}untyped arithmeticvar n int = 5 or typed function params
Go invalid operation: n * nuntyped function paramfunction square(n int) int
Python/JS NameError/x is not definedusing a var before any assignment anywheredeclare it first
JS TypeError: x.greet is not a functionclass method bodies not generateduse functions + maps
command not found: python3/node/go/java/rubyruntime not installedinstall it or set compiler.<lang>.command
Java cannot find symboluntyped/undeclared usagetyped annotations + var declarations

Inspect the generated code to confirm before changing your source:

gset transpile foo.gset --target go

Debugging tips

  • GSET_DEBUG=1 gset run foo.gset shows the temp file path and run command.
  • --keep preserves /tmp/gset_<base>.<ext>, Main.java, Main.class for inspection.
  • gset transpile shows exactly what the target compiler sees.

If your source produces a hang (no output, CPU pinned), that's a genuine bug in GSET — file an issue. Modern GSET terminates every parse with either output or an error. (timeout -s KILL 10 ./gset transpile file.gset --target python is a handy local sanity check.)

On this page