dump_accepted, accepted_dump_dir) into NikaiaOpen and answer this issue on GitHub.
ready · opened 2026-11-21 · updated 2026-11-21 · 0 comments
Part of #1200 Needs #1199
The last item of #1200: the sweep of accepted programs (#705) still writes its files from Rust, in crates/nikaia/src/check/mod.rs: accepted_dump_dir() reads NIKAIA_DUMP_ACCEPTED once (a Rust OnceLock), and dump_accepted() takes the test binary’s name from Rust’s std::env::current_exe() and writes the file. The name itself is already Nikaia (check_accepted_dump_name in crates/nikaia-std/src/compiler/check_glue.nika, which writes {hash:016x}). This part moves the two Rust functions into Nikaia, part of the self-hosting move (#125), decided in #1174: env::current_exe() from std (built in 134f0303, ADR-program-path-1) and the once value from immutable (ADR-389, built by #1199).
dump_accepted and accepted_dump_dir from crates/nikaia/src/check/mod.rs into Nikaia, using env::current_exe() for the binary’s name and an item-level immutable (#1199) for the directory read once; parser/mod.rs reads accepted_dump_dir() too and goes through the moved function. Test: a .nika test in tests/compiler/tests/ that checks a program with NIKAIA_DUMP_ACCEPTED set to a fs::scratch() directory and prints the one file name written (<binary>-<16 hex digits>.nika).crates/nikaia/src/check/mod.rs no longer holds dump_accepted or accepted_dump_dir, the sweep writes the same file names as before from the Nikaia code, and the commit that moves them is the one that closes this issue.
crates/nikaia/src/check/mod.rs, crates/nikaia/src/parser/mod.rs (the reader of accepted_dump_dir), crates/nikaia-std/src/compiler/check_glue.nika or the file the builder moves them to, its lowered .rs.
Split from #1200 by Claude Code