Relax :meck constraint to allow 1.x (fixes OTP 29 compile)#64
Merged
Conversation
`meck 0.9.2` no longer compiles on Erlang/OTP 29: the legacy
`'catch ...'` syntax in `meck_matcher.erl` was deprecated for years
and became a compile-time error in OTP 29. `meck 1.0` (released
2024-12-13) fixes this and has API-compatible `new/2`, `expect/3`,
and `passthrough/1` — the only meck APIs flame_on uses
(see `lib/flame_on/capture/server.ex`,
`lib/flame_on/capture/mock_function.ex`).
The constraint is widened to `~> 0.9 or ~> 1.0` so existing users
on OTP <= 28 with `meck 0.9.x` already in their lock are
unaffected — only OTP 29 users will pick up 1.x. The included
`mix.lock` bump moves this repo's pinned `meck` to 1.1.1 so the
test suite installs a working version.
Tested locally on Elixir 1.20.0-rc.6 / OTP 29.0:
$ mix deps.get
$ mix test
...
73 passed
Member
|
🎖❤️⭐️⚪️⭐️💙🎖 |
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.
Summary
meck 0.9.2, currently pinned by~> 0.9.2inmix.exs, no longer compiles on Erlang/OTP 29. The legacy'catch ...'syntax insrc/meck_matcher.erlwas deprecated for years and became a compile-time error in OTP 29:meck 1.0(released 2024-12-13) fixes this andmeck 1.1.1is the current latest. flame_on only uses:meck.new/2,:meck.expect/3, and:meck.passthrough/1(inlib/flame_on/capture/server.exandlib/flame_on/capture/mock_function.ex), all of which have unchanged signatures in 1.x.Changes
mix.exs:{:meck, "~> 0.9.2"}→{:meck, "~> 0.9 or ~> 1.0"}. Existing users withmeck 0.9.xalready locked inmix.lockare unaffected; only fresh installs or users explicitly bumping pick up 1.x.mix.lock: bumps the repo's pinnedmeckto1.1.1so this repo's CI /mix testactually exercises a working version (without this,mix deps.getkeeps the existing 0.9.2 lock entry and the OTP 29 compile still fails).