Completes plan 2 Tasks 7-8. owner.ml: mutable-value-semantics flow analysis producing the four plan-3 emitter tables (moves, drops incl. LIVE-MASK for trap unwinding, rc with elision, residual borrow sites) plus WO-E301-304 two-site diagnostics. Alias questions run over canonicalized places, so a double-mut reached through let-bound aliases lands in the residual table like the direct form; dump.ml's contract notes the emitter must coalesce guards per operand. main.ml: directory discovery, cross-file programs (symbols merge before bodies check), diagnostics ordered by (file,line,col), new WO-E214 for a name declared in two files. New docs/plan/oop-vm/01-error-catalog.md (14 emitted + 10 reserved codes), un-ignored so both plan tracks can cite it; justfile regains woc-*. builtin_scalars is now the five that work: Int, Bool, Text, Timestamp, Id. Money/SKU/Float and the abstract_types allowlist are gone — `abstract` never lexed, and Float had no literal syntax and no wob kind, so no value could exist. Fixtures and samples retype Money->Int, SKU->Text. The abstract newtype feature is rejected outright (verdict row adopt->reject); haxe-parity Task 7 keeps `is`. nullable-types-implementation.md corrected: ?T is plumbed but UNENFORCED (E211-213 declared, never emitted; probe exits 0), handed to haxe-parity Task 6 as next work item. Records all 10 dead codes incl. E205 — interface satisfaction is unchecked. crates/rt keeps its Money/SKU fixtures (opaque strings, Stage 2). Gate: build warning-clean, 14 + 264 checks 0 failures, pricing golden exit 0, docs/examples histograms unchanged (13/70, zero WO-E225).
37 lines
1.7 KiB
Text
37 lines
1.7 KiB
Text
; Task 2 seam: a plain assert-and-print test executable wired into
|
|
; `dune runtest`, just enough to TDD compiler/src/diag.ml. Task 3 adds
|
|
; the golden-file runner (runner.ml + test/golden/ fixtures) alongside
|
|
; this file — keep this stanza minimal so that addition is additive,
|
|
; not a rewrite.
|
|
(test
|
|
(name test_diag)
|
|
(modules test_diag)
|
|
(libraries woc_lib))
|
|
|
|
; Task 3: golden-file runner. (deps (source_tree golden)) does two
|
|
; jobs at once: it keeps the build-directory copy of golden/ that this
|
|
; test reads from fresh on every run, and it is *why* dune notices a
|
|
; fixture edit at all -- without a declared dependency on that
|
|
; directory, dune has nothing to digest to decide this test's cached
|
|
; PASS is stale, and a changed .wo/.expected file would go unnoticed.
|
|
; WOC_BLESS=1 rewrites the real compiler/test/golden files on disk
|
|
; directly (see runner.ml's module doc for why a bare relative write
|
|
; from inside a dune test would not do that). The ../bin/woc dep is for
|
|
; the CLI smoke section: it forces the woc binary to be built before
|
|
; this test runs, and (because dune places a directory dependency's
|
|
; target at the same relative path inside the sandbox) guarantees
|
|
; "../bin/woc" resolves from this test's cwd exactly the way runner.ml
|
|
; assumes.
|
|
; Task 8: (source_tree fixtures) is the same freshness/dependency need
|
|
; as (source_tree golden) above, for compiler/test/fixtures/driver/ --
|
|
; the multi-file CLI-smoke fixtures (directory discovery, cross-file
|
|
; symbols, diagnostic ordering) that run_cli exercises against the
|
|
; actual woc binary rather than the single-.wo-file golden framework.
|
|
(test
|
|
(name runner)
|
|
(modules runner)
|
|
(libraries woc_lib)
|
|
(deps
|
|
(source_tree golden)
|
|
(source_tree fixtures)
|
|
../bin/woc))
|