Skip to content

chore: upgrade to Elixir 1.20#7

Merged
BobbieBarker merged 1 commit into
mainfrom
chore/elixir-1.20
Jun 19, 2026
Merged

chore: upgrade to Elixir 1.20#7
BobbieBarker merged 1 commit into
mainfrom
chore/elixir-1.20

Conversation

@BobbieBarker

Copy link
Copy Markdown
Owner

What

Upgrades schema_cache's dev/CI toolchain to Elixir 1.20.1 / OTP 28:

  • .tool-versions: 1.19.5-otp-28 to 1.20.1-otp-28
  • CI ELIXIR_VERSION: 1.19 to 1.20
  • The published-library floor (elixir: "~> 1.14" in mix.exs) is unchanged, so consumers on Elixir 1.14 through 1.20 are unaffected. Only the toolchain we develop and test against moves.

Why the elixir_cache dep changes

Elixir 1.20 ships a new compile-time type checker. It flags the elixir_cache Cache macro: when a cache module passes opts as a compile-time-constant tuple, the macro generates an adapter_options!/1 catch-all clause that is statically unreachable, and 1.20 reports it as a never-used clause. This trips our test-only SchemaCache.Test.ElixirCacheRedis fixture and fails the CI quality job's mix compile --warnings-as-errors.

The fix lives on MikaAK/elixir_cache#47 ("Support Elixir 1.20"), which has not yet been released to hex (latest hex 0.4.8 still trips the warning). So the test-only dep is temporarily pinned to that branch:

{:elixir_cache,
   github: "BobbieBarker/elixir_cache", branch: "chore/elixir-1.20-upgrade", only: :test}

Follow-up: revert to a hex release ({:elixir_cache, "~> 0.x", only: :test}) once #47 merges and ships.

Lock churn

Switching elixir_cache to the git fork re-resolved mix.lock, incidentally bumping unpinned transitive deps within their existing constraints (decimal 2.3.0 to 2.4.1, jason 1.4.4 to 1.4.5, plug 1.19.1 to 1.19.2, telemetry 1.3.0 to 1.4.2) and adding libring (a new transitive dep of the fork's elixir_cache).

Verification (local, Elixir 1.20.1 / OTP 28)

  • mix compile --warnings-as-errors (dev and MIX_ENV=test): clean
  • mix format --check-formatted: clean
  • mix credo --strict: no issues
  • mix test: 117 passed (the 2 Redis-adapter files need a live Redis and run in CI, which provides the service)
  • mix dialyzer: 0 errors

🤖 Generated with Claude Code

Bump the dev/CI toolchain to Elixir 1.20.1 / OTP 28 and run CI on 1.20. The published-library floor stays at "~> 1.14" so consumers on older Elixir are unaffected.

Elixir 1.20's type checker rejects the elixir_cache Cache macro's generated adapter_options!/1 catch-all clause when the cache opts are a compile-time constant tuple (the test-only ElixirCacheRedis fixture). The fix lives on MikaAK/elixir_cache#47, which has not yet shipped to hex, so pin the test-only dep to that branch. Revert to a hex release once #47 lands.

Switching to the git fork re-resolved the lock, incidentally bumping unpinned transitive deps (decimal, jason, plug, telemetry) and adding libring, a new transitive dep of the fork's elixir_cache.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.71%. Comparing base (5b70a10) to head (5f92b69).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
+ Coverage   94.58%   94.71%   +0.13%     
==========================================
  Files           7        7              
  Lines         240      246       +6     
==========================================
+ Hits          227      233       +6     
  Misses         13       13              

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BobbieBarker BobbieBarker merged commit 1db00e9 into main Jun 19, 2026
5 checks passed
@BobbieBarker BobbieBarker deleted the chore/elixir-1.20 branch June 19, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant