The Wire · Showcase
JOSE VALIM FIXES THE CLASUE BUG
By RepoJournal · Filed · About Elixir & Phoenix
Jose Valim shipped two refactors plus the actual fix for that `none` clause compiler issue, and a UTC fast path in DateTime could save you a TZ DB lookup.
Jose Valim landed a fix that removes `none` clauses when non-empty clauses exist, closing #15777 [1]. This one's a compiler behavior change, and he refactored the code first so the fix is easier to follow [1]. Meanwhile, Dino Kovač's `DateTime.add/4` and `shift_zone/3` UTC fast path [2] means UTC datetimes no longer hit the TZ database when the app isn't started [2]. It's a niche issue, but the benchmark data shows real gains on Apple M1 Max [2]. Both are open PRs, so now's the time to review [3]. The compiler change is the one to watch if you've hit that edge case [4]. Skip the domain computation extraction unless you're deep in that code [5].
One email a day. Unsubscribe in one click.
Keep up with Elixir & Phoenix in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Review and test PR #15782 for the none clause fix elixir-lang/elixir [plan]
- → Review DateTime UTC fast path PR #15779 for potential performance wins elixir-lang/elixir [plan]
References
- [1] Remove none clauses if there are non empty clauses, closes #15777 ↗ elixir-lang/elixir
- [2] Add `DateTime` `add/4` and `shift_zone/3` UTC fast path ↗ elixir-lang/elixir
- [3] Remove none clauses if there are non empty clauses, closes #15777 elixir-lang/elixir
- [4] Add `DateTime` `add/4` and `shift_zone/3` UTC fast path (#15779) elixir-lang/elixir
- [5] Extract domain computation into a separate function elixir-lang/elixir