chore: upgrade to Elixir 1.20#7
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Upgrades schema_cache's dev/CI toolchain to Elixir 1.20.1 / OTP 28:
.tool-versions:1.19.5-otp-28to1.20.1-otp-28ELIXIR_VERSION:1.19to1.20elixir: "~> 1.14"inmix.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_cacheCachemacro: when a cache module passesoptsas a compile-time-constant tuple, the macro generates anadapter_options!/1catch-all clause that is statically unreachable, and 1.20 reports it as a never-used clause. This trips our test-onlySchemaCache.Test.ElixirCacheRedisfixture and fails the CI quality job'smix 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.8still trips the warning). So the test-only dep is temporarily pinned to that branch: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 (decimal2.3.0 to 2.4.1,jason1.4.4 to 1.4.5,plug1.19.1 to 1.19.2,telemetry1.3.0 to 1.4.2) and addinglibring(a new transitive dep of the fork's elixir_cache).Verification (local, Elixir 1.20.1 / OTP 28)
mix compile --warnings-as-errors(dev andMIX_ENV=test): cleanmix format --check-formatted: cleanmix credo --strict: no issuesmix 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