The simulation was in a package of its own for one reason: importing raylib linked libraylib on every target, so the headless run could not name the package the interactive one needs. That reason is gone, and the split was never anything else — the physics is the same code either way. So sim.flan is back inside sand.flan, and test/programs/sand-headless.flan imports sand.flan itself: window, raylib bindings, dev agent and all. It builds for wasm32 anyway. Nothing it calls reaches raylib, so no shim is compiled, no -lraylib is passed, and the front-end's functions are never emitted; sand.flan's main is not exported, so the only main is the headless one. The hash is unchanged on both targets at both optimisation levels, which is the point — a refactor that moved the number would have moved the simulation. The new cases cover what made it possible rather than only the result: a package nothing calls into, native and wasm32; raylib reached both directly and through sand.flan and read once; and the three refusals — sand/main, one directory under two aliases, and two mains. test_session's package-qualification case moves to vendor/agent, which is now the package in the tree with a defn in it.
13 lines
426 B
Plaintext
13 lines
426 B
Plaintext
;;;; A name the import did not bring.
|
|
;;;;
|
|
;;;; sand.flan declares a main and this imports it, so sand/main is a name
|
|
;;;; somebody might reasonably write — and is not one. Left to the checker it
|
|
;;;; would be "unknown name", which is true and unhelpful; the refusal has to
|
|
;;;; say the name is missing on purpose. Never built: the refusal is the test.
|
|
|
|
(import sand "../../sand.flan")
|
|
|
|
(defn main [] i32
|
|
(sand/main)
|
|
0)
|