Skip to content

Alice v1.0.2

Choose a tag to compare

@github-actions github-actions released this 04 Nov 21:58
  • fix: alice run and alice build on loose files now compile through the IL backend, the 1.0 default (ADR 0033). 1.0.0 and 1.0.1 resolved --backend / ALICE_BACKEND and dropped the result, so both commands always used the C# printer + Roslyn (only alice emit --il reached the IL backend). One Backend call in CompileCommands feeds both; --backend csharp and ALICE_BACKEND=csharp select C#. A program the IL backend cannot compile yet (e.g. a C Callback parameter, examples/interop/libc.al) or one with @[Native] C uses the C# image with a one-line note: on stderr, never silently. The status line names the backend (Compiling main (il, 1.3s)); an IL build writes its .pdb; the run cache keys on the backend. alice check stays on the C# diagnostic gate. Package and workspace builds (alice.toml, MSBuild) still compile the generated C#. Pinned by BackendSelectionTests.
  • fix: a plain alice prove at the repository root works: a directory holding a .alice-noprove file (and everything below it) is left out of the source scan, like a nested package. tools/fuzz/findings (fuzzer inputs meant not to compile), benchmarks, docs, examples and src carry the marker, so the root proves RULES.al alone, the same as alice prove RULES.al. Pinned by A_plain_prove_skips_directories_marked_alice_noprove.
  • docs: ADR 0033, docs/tooling.md, README, docs/performance.md and the 1.0.0 release notes now say what 1.0.2 does: loose files default to IL, package builds stay on C# until 1.1. IL gaps that fall back to C# are pinned as skipped tests in tests/Alice.Tests/Backends/IlGapTests.cs (1.1 items).
  • fix: Par.Range / Par.Reduce with a struct kernel allocated a fresh job (and, for Reduce, its partials array) on any call whose previous call still had queued helpers. That happens whenever the pool wakes late and the caller runs every chunk itself: on 3-core macOS runners, Jobs_are_reused_in_steady_state saw 288 B (a 72 B job plus 24 partials). The owner now always reuses its job. The chunk count and the claim counter share one 64-bit word, replaced atomically after the run's fields are set, so a late helper either finds its old run closed or joins the current one. Pinned by Jobs_are_reused_while_their_helpers_are_still_queued: every pool thread is held, then the test expects exact 0 B and exact sums. Before the fix it saw 288 B on 3 cores and 1120 B on 28.
  • alice check without files skips .alice-noprove directories too (the same scan helper as alice prove). Pinned by A_plain_check_skips_directories_marked_alice_noprove.
  • perf: typed JSON readers (from_json, JSON.parse(T, ...)) are fast again: since 1.0.0 every field-name miss re-encoded the name to UTF-8 and every empty array allocated 4 slots (benchmarks/core/json twitter typed-gen 0.60 -> 1.44 ms, citm_catalog 0.85 -> 1.17 ms, both C# and IL). Names are now grouped by UTF-8 length and compared with JsonMap.IsAscii (length first), and JsonMap.NewArray starts empty: twitter 0.66 ms, citm_catalog 0.96 ms (STJ source-gen 1.16 / 4.46 ms), allocations back to 342832 / 862048 B. Pinned by Readers_match_names_by_length_and_empty_arrays_allocate_nothing.
  • benchmarks re-run on 1.0.1 (b2e41c8, the forge, 2026-11-04): bend2 serial for all 16 workloads with the IL image (alice emit --il), the C# image and C; IL vs C# backend (geomean 0.963); arena ports vs records; Alice Core regex, JSON and library modules. Raw hyperfine files in benchmarks/bend2/results/1.0.1/, benchmarks/core/results/1.0.1/. bend2/report.py reads the serial core pair from results/serial_cpus.txt (written by run.sh). The all-core tables are not re-run yet.

Archives built from 18d73e5. Build and package checks: https://github.com/alicelanguage/alice/actions/runs/41917991062