Open and answer this issue on GitHub.
blocked · opened 2026-10-30 · updated 2026-11-03 · 0 comments
Part of #983. Records: ADR-async-4, ADR-async-3 D5, ADR-async-2 D3. Needs #988 (lowering) and #989 (errors).
Rewrite every program and test that uses overlap, task::scope or spawn (the first two counted on develop da60178, see #983).
overlap/task::scope: benches/overlap/pair.nika (with #868), tests/compiler/tests/overlap_*.nika (become async_* with the new messages), tests/language/src/joining.nika, error_types.nika, task_scope.nika (tests 1 and 3 use two SharedMut::update tasks, see #985: rewrite with values). overlap { a(); b() } → let (x, y) = (async a(), async b()); a scope looping over a list → xs.par_iter().for_each or .map … .collect().spawn → async(detached): spawn fn { … } → async(detached) fn { … }, let h = spawn fn { … } → let h = async(detached) fn { … }, everywhere in .nika (tools/, crates/nikaia-std/src/tools/, tests/, examples/, benches/, packages/, guide/); a scripted rewrite (a nikaia run tool), then the diff read. A spawn + join in one scope that borrows nothing it must move may become async(handle) or async e: only where the test means that.par_iter lambdas that now meet NK2104 (print or write a resource): move to the value form (map, collect, then print).crates/nikaia/tests/it/ that use the forms (38 overlap blocks in 12 files, 10 task::scope in 3, and the spawn ones): move each still-meaningful case to a Nikaia test (#821); delete those that test only overlap’s rules. tasks.rs:469 (two printing tasks) becomes an NK2104 refusal test.docs/briefs/p5d-project-check.draft.nika and examples/foreign-runtime/overlaps.nika comments.user_parallelism settings.Generated by Claude Code