$ the-wire · showcase
Elixir's typechecker stops crashing on non-Elixir structs, Phoenix unifies path validation
By RepoJournal · Filed · About Elixir & Phoenix · Composed from the cited sources · methodology
Elixir's 1.21.0-dev typechecker gets two fixes for warnings and crashes it was generating on its own, while Phoenix pulls its path and host handling into line across the endpoint and transport layers.
Fix typechecker crash on non elixir struct module in defimpl elixir-lang/elixir
Defining a protocol implementation for a module outside Elixir, such as `defimpl OxP, for: :gen_server`, blew up compilation with `function :gen_server.__info__/1 is undefined or private` because the typechecker invoked it without checking it was exported first. The fix mimics the existing guard in `struct_info/6`, so modules that don't export `__info__/1` no longer take the compiler down with ...
unify path validation phoenixframework/phoenix
Steffen Deusch's change consolidates how Phoenix validates request paths so the endpoint and transport layers no longer apply separate rules. If you've been asserting on which layer rejects a malformed path, expect that behavior to converge.
Mark type-check macro expansions as generated elixir-lang/elixir
Since `%_{}` patterns became precise, the type-check macros leaked their own expansion warnings into user code, so `def uri?(%URI{} = uri), do: is_struct(uri)` warned that a clause "cannot match because the previous clauses already matched all possible values." Marking those expansions as generated silences warnings that came from the checker, not your code.
Optimize Keyword.split/2 with :lists.partition/2 elixir-lang/elixir
Rails-level trivia: `Keyword.split/2` swaps its fold-and-reverse implementation for `:lists.partition/2`. Benchmarks across list sizes 0, 2, 5, 10 and 20 generally favor the candidate, though the author notes p99 timings were volatile and flip-flopped during measurement.
align nil host handling in endpoint and transport phoenixframework/phoenix
Related housekeeping: nil host handling in the endpoint and transport is now aligned, matching the same unification effort as the path validation work. Formatter suite warnings and the underlying commits round out a quiet stretch on the Elixir side.