The Wire · Showcase
ELIXIR TIGHTENS GUARD SYNTAX, PHOENIX FIXES MIX DETECTION
By RepoJournal · Filed · About Elixir & Phoenix
José Valim shut down a common footgun in Elixir guards while the team fixed a startup bug that breaks when mix is available but not yet started.
Elixir now raises when developers use the pipe operator inside guard clauses, a syntax that compiles but behaves unexpectedly [2]. This catches a category of subtle bugs at compile time instead of runtime. The same push includes a fix for constant retrigger of protocol consolidations in umbrella projects [1], a performance issue that could slow your build on every compile, and proper Unicode escaping for codepoints above ASCII range [3]. Over in Phoenix, Steffen Deusch patched a startup sequence bug where the framework fails to initialize when mix is available on the system but hasn't been started in the current runtime context [4]. The fix also ensures check_symlinks is set correctly when mix is present. In phoenix_live_view, morphdom was reclassified as a dev dependency [5], cleaning up the production dependency tree.
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 guard clauses for pipe operators if you have existing code flagged by the new compiler error elixir-lang/elixir [plan]
- → Update Phoenix if you hit startup failures with mix available but not started phoenixframework/phoenix [immediate]
- → Rebuild phoenix_live_view with morphdom moved to dev dependencies phoenixframework/phoenix_live_view [plan]
References
- [1] Fix constant retrigger of protocol consolidations in umbrellas elixir-lang/elixir
- [2] Raise when | is used in guards, closes #15734 elixir-lang/elixir
- [3] Properly escape unicode codepoints above ASCII range elixir-lang/elixir
- [4] fix starting phoenix with mix available but not started (#6790) phoenixframework/phoenix
- [5] morphdom is a dev dependency phoenixframework/phoenix_live_view