ElixirStatus
Read post

Shimming Your Way Off a Dead Elixir Dependency • Mike Zornek

When upgrading ex_money required removing the stale Timex library from a large Elixir codebase, a two-phase shim approach made the migration safe and reviewable. Phase 1 introduces a shim module that mirrors only the Timex functions actually used, backed by Elixir's standard library, with characterization tests that compare shim output directly against Timex while both are still installed. Phase 2 mechanically replaces call sites and removes Timex from mix.exs. The shim then erodes gradually as code is touched for other reasons. The technique maps to three classic patterns: seams (Feathers), characterization tests, and the strangler fig pattern applied at dependency scale rather than system scale.

    #elixir
Jul 27•9m read time•From mikezornek.com
Post cover image
Table of contents
When the footprint is small, replace itWhen the footprint is large, introduce a shimThe textbook names for what we just didA note on the idiomatic alternative
309 Impressions
ElixirStatus's image
ElixirStatus

ElixirStatus offers insights into Elixir programming language, OTP framework, and functional program...

215 Followers

•

1.7K Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard