chore: upgrade elixir and otp - #40
Conversation
PR Summary
Written by Cursor Bugbot for commit b49f0ab. This will update automatically on new commits. Configure here. |
|
Warning Rate limit exceeded@yordis has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 15 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (7)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThe pull request updates the project toolchain to Elixir 1.19 and Erlang 27.3.2, updates CI configuration accordingly, and refactors internal state representation in aggregate modules from struct updates to map operations. The mix.exs configuration is reorganized with a new cli/0 function and restored application wiring. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
e95f4f1 to
440a70a
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
.tool-versions (1)
1-2: Elixir version missing patch number.The Elixir version
1.19-otp-27is missing the patch number. The correct format is1.19.0-otp-27(or whichever patch version is intended). This will likely causeasdf installto fail.
🧹 Nitpick comments (2)
lib/commanded/aggregates/aggregate.ex (1)
364-364: Inconsistent struct update syntax.This line uses
%{state | ...}(map syntax) while other similar updates in the same file use%Aggregate{state | ...}(struct syntax) — see lines 415, 462-466, and 572-576. The map syntax loses compile-time key validation. If this change is intentional for Elixir 1.19 compatibility, consider applying it consistently throughout the file; otherwise, revert to the struct syntax for consistency and type safety.Option 1: Revert to struct syntax for consistency
- state = %{state | lifespan_timeout: lifespan_timeout} + state = %Aggregate{state | lifespan_timeout: lifespan_timeout}lib/commanded/aggregates/aggregate_state_builder.ex (1)
99-103: Map syntax loses compile-time key validation.Using
%{state | ...}instead of%Aggregate{state | ...}is functionally equivalent (the struct type is preserved at runtime), but loses compile-time validation that the keys:aggregate_versionand:aggregate_stateexist in the struct. This is also inconsistent with thepopulate/1function above (lines 50-54, 58) which uses struct syntax.If this change is intentional for a specific reason, consider applying it consistently; otherwise, prefer the struct syntax for better compile-time guarantees.
Revert to struct syntax for consistency
- state = %{ + state = %Aggregate{ state | aggregate_version: stream_version, aggregate_state: aggregate_module.apply(aggregate_state, data) }
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.github/workflows/ci.yml.tool-versionslib/commanded/aggregates/aggregate.exlib/commanded/aggregates/aggregate_state_builder.exmix.exs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Quality Assurance (1.19.x, 27)
- GitHub Check: Cursor Bugbot
🔇 Additional comments (3)
mix.exs (2)
12-12: Verify Elixir version constraint compatibility withcli/0callback.The
cli/0callback was introduced in Elixir 1.15, but the project declareselixir: "~> 1.12"on line 12. If supporting older Elixir versions is intended, this will cause issues. Consider updating the constraint to"~> 1.15"or higher to match the new toolchain.Also applies to: 27-35
37-42: LGTM!The
application/0function is correctly restored with properextra_applications/1andmodconfiguration. This aligns with standard OTP application setup..github/workflows/ci.yml (1)
46-48: LGTM!The CI matrix update to Elixir 1.19.x with OTP 27 aligns with the toolchain upgrade. The
1.19.xformat is valid forerlef/setup-beamand will resolve to the latest 1.19 patch release.
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
440a70a to
b49f0ab
Compare
No description provided.