Elixir 1.21 Release Candidate Closes a Type-Narrowing Gap as Dashbit Debuts Lynx, a Lean-Based Proof Tool
The 1.21.0-rc.0 changelog cites fuzzing and proof assistants for bug-hunting as a companion blog post shows v1.21 now passes every test in the If-T type-narrowing benchmark.
Overview
The Elixir core team published v1.21.0-rc.0 on November 30, 2026, a release candidate the changelog says “focuses on improving the performance and fixing bugs in Elixir,” adding that “property-based testing, fuzzing, and proof assistants have been used to uncover bugs in the compiler and the type system.” The release note’s mention of proof assistants lines up with two posts published by Elixir’s core team in the weeks around the candidate: a November 10 article on elixir-lang.org showing that v1.21 now passes a type-narrowing benchmark that v1.20 only partly cleared, and a December 1 post on Dashbit’s blog introducing Lynx, a new tool for writing machine-checked proofs about Erlang and Elixir code.
What the release candidate changes
According to the v1.21.0-rc.0 release notes, the changelog lists the type-checker work as “[Kernel] Refine variables through the assignments in conditionals, such as y = is_integer(x); if y, do: x, else: x” alongside a related change to refine variables “across or, ||, and the falsy side of and and && in conditions.”
The same notes flag several bug fixes as “potential breaking changes.” Among them, the release raises on empty exception lists in rescue, such as rescue e in [], rather than silently rescuing every error, and it changes Process.exit/2 to “use exit_signal/2 from :erlang,” so that exit signals sent to the calling process “are delivered asynchronously” and the :normal reason “no longer terminates it.” The notes also record that ExUnit.Assertions previously let “variables bound on one side of assert left op right” leak into the other side, “which could make false assertions pass” in tests. Separately, the release soft-deprecates atom interpolation (:"foo_#{bar}") in favor of the explicit String.to_unsafe_atom/1, and bumps Elixir’s Unicode support to version 18.0.0.
The type-narrowing benchmark
The elixir-lang.org post, written by José Valim and Guillaume Duboc, states that “the upcoming Elixir v1.21 passes all tests in the If-T: Type Narrowing Benchmark by Guo et al.,” a benchmark the post describes as “a collection of test scenarios designed to evaluate both the precision and soundness of type narrowing.” The post says “Elixir v1.20 already handled 12 out of the 13 tests,” but could not infer types correctly when a boolean condition was first assigned to a variable before being checked in an if — for example, y = is_integer(x) followed by if y do ... end. In that pattern, the post explains, v1.20 “only” reversed the arrows of is_integer(x) “for the expression given directly to if or case,” so once x’s check was captured in the variable y, the connection was lost.
The post says v1.21 “solves this by keeping track of the expression each variable was assigned to,” so that narrowing y to true now propagates back through is_integer to narrow x to integer() as well, “across any number of assignments.” The same mechanism, the post adds, extends to pattern matching and case expressions. The post notes the underlying type system work was “made possible thanks to a partnership between CNRS and Remote,” with ongoing development “sponsored by Fresha, Supermethod and Dashbit.”
Lynx: proofs about the actual code
In a December 1 post, Dashbit founder José Valim introduced Lynx, describing it as a project “that allows us to formally verify Erlang/Elixir programs using Lean,” the proof-assistant language. The post explains the workflow: “You write laws in Erlang/Elixir, which are automatically translated to Lean, and you write proofs in Lean. The laws and proofs are combined and verified by Lean’s kernel.” Valim contrasts this with testing a separate model of the code or a compiled artifact, writing that proofs are “written about the actual Erlang/Elixir code, instead of a model (which may drift) or a compilation artifact (which typically checks lower-level guarantees).”
The post lists concrete uses of the tool so far: “We have used Lynx to validate that Erlang’s json implementation roundtrips, to guarantee functions in Elixir’s Task module do not leave trailing messages in your inbox, to uncover bugs and gaps in Elixir’s type system (more on this soon), and more.” The post does not detail which specific type-system bugs or gaps Lynx surfaced, saying only that more detail is coming later. Valim frames proof assistants as a complement to, not a replacement for, existing techniques, writing that type systems “do encode some guarantees about our programs, but they are often not expressive enough to encode properties we care about,” and that techniques like property-based testing “can only finitely check many inputs from infinitely many options” and so “cannot ensure the absence of errors.” Lynx is distributed as a Hex package, according to the post, and its source is published on GitHub.
Context
The 1.21 release candidate follows Elixir 1.20.0, which The Machine Herald previously reported shipped as a stable release on June 3, 2026, completing the project’s initial push toward a gradually typed language. The narrowing improvements and the Lynx tool described in the November and December posts extend that same type-system effort into its next phase, with the release notes’ reference to proof-assistant-driven bug hunting tying the two threads together. As of publication, v1.21.0-rc.0 remains a release candidate; the Elixir core team has not published a stable-release blog post for version 1.21.