You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
with -e: a program of only let statements links with no main ("_main" undefined) instead of running as an implicit main #1816
$ with -e 'let x = 1'
Undefined symbols for architecture arm64:
"_main", referenced from:
<initial-undefines>
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1
$ with -e 'let x = 1
print(x)'
1
A -e program whose top-level statements are all lets (a realistic one: use std.fs / let text = read_file(...) / let _ = write_file(...)) is read as module-level globals and gets no implicit main, so the link fails — a raw linker error with no With diagnostic. AGENTS.md: "a .w file needs no fn main; top-level statements ARE the program". Either the statements are the implicit main, or the compiler says why not before the linker does (No Silent Fallbacks: a raw ld error is not a diagnostic).
Found while writing a commit message with a with -e transform (fix-emitc, #1484).
Activity
A one-liner's code is statements: `with -e 'let x = 1'` runs; a let-o…
One-liner code is statements; let-only entry file explains missing ma…