Xo v0.8.0
Spec draft 0.8.
- Modules (decision 0086 steps 1 and 2):
require <path> <version>of Xo modules, minimal version selection, git fetch into a read only module cache,xo.lockhashes verified on every build,xo get,xo mod tidy,xo vendor,xo mod clean,--offline, andxo.workworkspaces (--workspace=off). Diagnostics XO1301 to XO1308. - Codex r2 first run failures:
XO0175for several match arms on one line has a split fix and no longer cascades into a falseXO0301;.display()works on everyDisplaytype (derived, std errors, builtins); a closure that never completes infersNeverinstead ofXO0402. - Effect ceilings and checked semver (decision 0086 steps 3 and 4):
require <path> <version> uses nonein xo.mod anduse <dir> uses ...in xo.work (XO1309 at a call above the ceiling), API and effect diffs fromxo get(andxo get -u),xo publish [--check]against the previous tag (XO1310, XO1311; prints the tag command, never pushes),xo init,/vNmajor version module paths, andxo servenoticing a new or changed xo.work above the directories. std/time(decision 0094, Go backend): zones with per use embedded data (--tzdata=system), civil dates and times with explicit daylight saving gaps and overlaps, layouts with named fields checked at compile time (XO0420; XO0177 for{yyyy},%Y,2006-01-02habits).- Import direction rules (decision 0095):
deny <pkg> -> <pkg>, ...lines in xo.mod with/...patterns, checked at everyuseline (new code XO1312; a rule naming no package is XO1301), kept byxo mod tidy;xo query importsandxo query depslist theuselines (also in the MCPquerytool). - std/time error text (std.md 13):
ZoneErrandCivilErrdisplay as sentences (unknown time zone "Mars/Olympus",2026-03-08T02:30:00 America/New_York does not exist (skipped by a daylight saving change)) instead of the derivedSkipped(at: ...)form, matchingParseErrandLayoutErr. - Newtypes (decision 0097, spec audit gap 4):
e.0reads the underlying value andEmail(s)destructures it inletandmatch. xo check --fix(decision 0096): applies the unambiguous machine fixes (asxo fix), reformats, then reports what remains plus anappliedlist; the MCPchecktool takesfix, and the bench harness agent loop uses it while still scoring first runs as written and after fix.- Go backend output (decision 0098): hello world 7.9 to 3.6 MB, Go build
cache growth per program 34 to 2.9 MB, compile memory 286 to 123 MB.
Binaries carry no DWARF or symbol table (
XO_GO_DWARF=1keeps them for a debugger); programs that do not import std/http do not link net/http. - Spec audit second pass:
x.debug()works on every value (std.md 1; was XO0601 on concrete types); new tests for single field positional variants,Secretredaction in Debug and log fields,targetat run time,Stdio.write,Fs.cwd,Fs.case_sensitive, a realProc.run,XO-F005,xo test --real, and byte identical rebuilds (spec 12.1 now says “in the same directory”). - Modules in repository subdirectories (decision 0086): a module path
github.com/acme/tools/cliis the directorycli/of the repositorygithub.com/acme/tools, versioned by tagscli/vX.Y.Z(as Go); fetch, MVS, xo.lock,xo vendor,xo get, andxo publish [--check](prefixed tag command) handle it; nested modules are left out of a module’s tree and hash. - Go calls in record and replay (decision 0093 stage 1):
--recordrecordsuse gocalls whose arguments and results are values (an argument hash and the results) andxo replayanswers them without calling Go; calls with a Go handle or a callback run again and the replay reportsre executed foreign call `<name>`; pure std packages and xo.modreplay rerun go <path> [names]lines are not recorded. Binding format v5; traces gain"foreign": 1, and older traces still replay (every Go call runs again). - Release builds (decision 0099):
xo build --releasecompiles outrequires(debug)andensures(debug)on every backend and reports XO1308 for workspace overrides;--cidoes not imply it. - Lazy error frames (decision 0092, Go backend): frames keep copies of
the parameter values and format them, bounded to 64 bytes, only when a
trace is printed. 1,000,000 errors through 5 frames: 0.93 s to 0.10 s
with short parameters, 2.78 s to 0.10 s with 90 byte ones; error output
unchanged.
xo build --release --error-args=falsedrops the values.