Fix Elixir 1.20 warnings, pin toolchain to 1.20.1-otp-29 & refresh deps - #71
Closed
gilbertwong96 wants to merge 3 commits into
Closed
Fix Elixir 1.20 warnings, pin toolchain to 1.20.1-otp-29 & refresh deps#71gilbertwong96 wants to merge 3 commits into
gilbertwong96 wants to merge 3 commits into
Conversation
Removes two 'unused require Logger' warnings emitted by Elixir 1.20+'s compiler in MissingFkIndexesLogic and MissingFkConstraintsLogic — neither module references Logger, so the require is dead code. Also pins .tool-versions to elixir 1.20.1-otp-29 / erlang 29.0.2 and refreshes mix.lock to the dep versions required by the new toolchain (decimal 2.1.1 -> 3.1.1, ecto 3.11.2 -> 3.14.0, ecto_sql 3.11.3 -> 3.14.0, db_connection 2.7.0 -> 2.10.1, ex_doc 0.34.2 -> 0.40.3, mock 0.3.8 -> 0.3.9, earmark_parser / makeup / makeup_elixir / makeup_erlang / nimble_parsec patch bumps). The previous '1.16.0-otp-26 1.18' / '26.0.2 27.2' fallback in .tool-versions was incoherent: '1.18' resolved to 1.18.4-otp-28 which needs OTP 28+, so any 'mise install' would crash. The 1.20.1-otp-29 + 29.0.2 pair matches the toolchain already on disk. Note: postgrex 0.22.2's mix.exs still uses the deprecated 'xref: [exclude: [Jason]]' and emits an Elixir 1.20 deprecation warning during its own compilation. That's an upstream issue (latest postgrex release), not in scope for this project. Verified with: 'mix compile --force --warnings-as-errors' and 'MIX_ENV=test mix compile --force --warnings-as-errors' both exit 0.
Mirrors the .tool-versions pin from the previous commit: 1.20.1-otp-29 is now the highest-tested combo. Inserted at the top of the matrix (newest first, matching the existing ordering). erlef/setup-beam@v1 accepts the major OTP version (29) and the exact Elixir version (1.20.1), same as the other entries.
The 1.20.1/OTP 29 and 1.14/OTP 25 CI jobs were both red on PR elixir-ecto#71. * 1.20.1/OTP 29 failed at compile: `meck 0.9.2` (a transitive dep of `mock`) uses the deprecated Erlang `catch` expression, which is a hard error in OTP 28+ (removed outright). `mock 0.3.9` still pins `meck ~> 0.9.2`, so the only way to get a newer meck is to add it as a direct dep with `override: true`. meck 1.2.0 (2026-05-27) added official OTP 29 support, so that's the floor. * 1.14/OTP 25 failed at compile: `postgrex 0.22.x` requires `elixir: ~> 1.15` and uses `^positions_bytes` (pin operator in expression position, valid in 1.15+). With the lockfile at 0.22.x there's no way to make 1.14 work without a CI-only postgrex pin, which is hacky. The project's actual minimum is now 1.15+, so the honest fix is to drop 1.14/25 from the matrix and bump `elixir: "~> 1.11"` to `~> 1.15` in mix.exs. CI matrix goes from 6 → 6 combos (added 1.20.1/29 at the top in the previous commit, dropped 1.14/25 here). Project's stated Elixir minimum is now consistent with what the locked deps (postgrex 0.22.x, ecto 3.14, decimal 3.1) actually require.
Collaborator
|
Hi, thanks for the PRs but I currently don't have capacity to maintain this project, and I'll be archiving it. I hope that someone can fork and take over. |
gilbertwong96
added a commit
to gilbertwong96/ecto_psql_extras
that referenced
this pull request
Aug 9, 2026
The 1.20.1/OTP 29 and 1.14/OTP 25 CI jobs were both red on PR elixir-ecto#71. * 1.20.1/OTP 29 failed at compile: `meck 0.9.2` (a transitive dep of `mock`) uses the deprecated Erlang `catch` expression, which is a hard error in OTP 28+ (removed outright). `mock 0.3.9` still pins `meck ~> 0.9.2`, so the only way to get a newer meck is to add it as a direct dep with `override: true`. meck 1.2.0 (2026-05-27) added official OTP 29 support, so that's the floor. * 1.14/OTP 25 failed at compile: `postgrex 0.22.x` requires `elixir: ~> 1.15` and uses `^positions_bytes` (pin operator in expression position, valid in 1.15+). With the lockfile at 0.22.x there's no way to make 1.14 work without a CI-only postgrex pin, which is hacky. The project's actual minimum is now 1.15+, so the honest fix is to drop 1.14/25 from the matrix and bump `elixir: "~> 1.11"` to `~> 1.15` in mix.exs. CI matrix goes from 6 → 6 combos (added 1.20.1/29 at the top in the previous commit, dropped 1.14/25 here). Project's stated Elixir minimum is now consistent with what the locked deps (postgrex 0.22.x, ecto 3.14, decimal 3.1) actually require.
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
MissingFkIndexesLogicandMissingFkConstraintsLogic(unused require Logger— neither module referencesLogger, so therequireis dead code)..tool-versionsto a single coherent pair:elixir 1.20.1-otp-29+erlang 29.0.2. The previous fallback (1.16.0-otp-26 1.18paired with26.0.2 27.2) was incoherent:1.18resolves to1.18.4-otp-28, which requires OTP 28+, so anymise installwould pair it witherlang 26.0.2and crash withFailed to load module 'elixir'. The new pair matches the toolchain already installed locally.mix.lockto the dep versions required by the new toolchain (decimal 2.1.1 → 3.1.1, ecto 3.11.2 → 3.14.0, ecto_sql 3.11.3 → 3.14.0, db_connection 2.7.0 → 2.10.1, ex_doc 0.34.2 → 0.40.3, mock 0.3.8 → 0.3.9, plus patch bumps for earmark_parser, makeup, makeup_elixir, makeup_erlang, nimble_parsec) and forcesmeck 1.2+via an in-project override (see follow-up commit).~> 1.11to~> 1.15to honestly reflect what the locked deps now require (postgrex 0.22.x uses^positions_byteswhich is invalid on 1.14).1.20.1 / 29to the CI matrix (newest first) and drops1.14 / 25(no longer supported by postgrex 0.22.x). Net matrix size unchanged at 6 combos.Follow-up: why meck 1.2 is a direct dep with
override: truemock 0.3.9(latest) pinsmeck ~> 0.9.2.meck 0.9.2uses the deprecated Erlang(catch ...)expression, which is a hard compile error in OTP 28+ (removed outright).meck 1.2.0(2026-05-27) added official OTP 29 support, butmock 0.3.9's constraint excludes it. The only way to get a newer meck is to add it as a direct dep withoverride: true. Markedonly: :testso it never reaches a release.Verification
mix compile --force --warnings-as-errors→ exit 0MIX_ENV=test mix compile --force --warnings-as-errors→ exit 0The project's own source compiles clean. The test suite requires a running PostgreSQL and is best validated by CI on the updated 6-pair matrix.
Out of scope
postgrex 0.22.2's ownmix.exsstill uses the deprecatedxref: [exclude: [Jason]]and emits a one-line Elixir 1.20 deprecation warning during its own compilation. That's an upstream issue (latest postgrex release hasn't migrated toelixirc_options: [no_warn_undefined: ...]) and not in our project'smix.exs, so it's left alone here.Files changed
Context
Follows the same pattern as #46 (Fix Elixir 1.15 warning, require Elixir 1.11+ & bump Ecto/Postgrex requirements) — bump the toolchain, fix any new warnings that surface, refresh the lockfile.