chore(sync-service): upgrade Elixir to 1.20.0-rc.3#3992
Conversation
Upgrade Elixir from 1.19.5 to 1.20.0-rc.3 while keeping Erlang/OTP at 28.4. Fix Elixir 1.20 compatibility warnings: - Remove 7 unused `require` statements detected by stricter checks - Add pin operator (`^`) in bitstring size patterns (5 occurrences) - Rename `Changes.record()` type to `Changes.row()` to avoid overriding new built-in `record/0` type - Remove unreachable `:shutdown` case clause in pool.ex (caught by improved type inference from preceding handle_info clause) - Use `apply/3` in telemetry.ex to avoid type checker flagging compile-time conditional as always-false Also bump postgrex 0.21.1 -> 0.22.0 (with db_connection and telemetry transitive bumps). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude Code ReviewSummaryThis PR upgrades Elixir from 1.19.5 to 1.20.0-rc.3, fixes all resulting compatibility warnings in Electric's source, and bumps postgrex to a git commit with the Elixir 1.20 compatibility fix. The changes are mechanical and correct. What's Working Well
Issues FoundCritical (Must Fix)None. Important (Should Fix)Still upgrading to an RC, not a stable release File: From iteration 1: the version being pinned is Suggestions (Nice to Have)None remaining. Issue ConformanceNo linked issue (unchanged from iteration 1). The PR description clearly covers motivation and scope, so this is a minor point for a maintenance upgrade. Previous Review Status
The two fixup commits addressed the postgrex warnings by switching from a not-yet-released Review iteration: 2 | 2026-03-11 |
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
- Fix unused `require Logger` in electric-telemetry (stack_telemetry.ex) - Fix bitstring pin operator in elixir-client (postgres.ex) - Restore `require Logger` in stack_supervisor/telemetry.ex (needed with MIX_TARGET=application) - Use postgrex from git main to pick up the Elixir 1.20 unused-clause fix (elixir-ecto/postgrex#760) - Remove progress file (review feedback) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix mix.exs formatting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Found 1 test failure on Blacksmith runners: Failure
|
Summary
requirestatements^) in 5 bitstring size patternsChanges.record()toChanges.row()(new built-in type conflict):shutdownclause in pool.ex (improved type inference)apply/3in telemetry.ex to avoid compile-time conditional type warningKnown issue
Postgrex.Types.definegenerates code that Elixir 1.20's compiler flags as having unused functions. This is a postgrex compatibility issue — the 2 warnings come from generated code and cannot be suppressed from our side. Electric's own source is warning-free.Test plan
mix compilepasses (only 2 dep-generated warnings remain)mix format --check-formattedpassesmix testpasses (382 doctests, 8 properties, 1443 tests, 0 failures)🤖 Generated with Claude Code