Repository navigation
chore!: remove deprecated project macros in Ecto projections - #31
Conversation
WalkthroughThis change removes deprecated projection macro syntax in favor of lambda-based functions, deletes an entire test module validating the old syntax, and updates documentation to reflect breaking changes in the API. The refactoring consolidates projection handling and removes obsolete code patterns. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
5b42e22 to
0bc7032
Compare
1cd6d39 to
e8deb86
Compare
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
e8deb86 to
9cbd2fa
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
guides/explanations/fork-differences.md (1)
16-22: Consider adding PR reference and rationale for consistency.Other breaking change entries in this document (ProcessManager, Upcasting, EnrichedMetadata) include both a PR reference and a "Reason:" subsection explaining the motivation. Adding these would improve consistency and help maintainers and users understand the context behind the change.
~### **Removed Deprecated Ecto Projections "do end" Block Syntax** +### **Removed Deprecated Ecto Projections "do end" Block Syntax** +[PR #31](https://github.com/straw-hat-team/commanded/pull/31) **Changes:** - Removed deprecated `project(event, do: block)` macro variant - Removed deprecated `project(event, metadata, do: block)` macro variant - Only function-based syntax is now supported: `project(event, fn multi -> ... end)` + +**Reason:** Consolidating on a single, function-based API reduces cognitive load and aligns with Elixir idioms, eliminating the need to maintain and document multiple syntax variants.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
guides/explanations/fork-differences.md(1 hunks)lib/commanded/projections/ecto.ex(0 hunks)test/projections/deprecated_projection_test.exs(0 hunks)
💤 Files with no reviewable changes (2)
- test/projections/deprecated_projection_test.exs
- lib/commanded/projections/ecto.ex
⏰ 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). (1)
- GitHub Check: Quality Assurance (1.18.x, 27)
🔇 Additional comments (1)
guides/explanations/fork-differences.md (1)
16-22: Breaking change documentation is clear and accurate. ✅The removal of deprecated do-block syntax is well-documented with clear before/after guidance on the supported function-based approach. This will help users migrating from the old API.
Note
Removes deprecated do-end Ecto projection macros, standardizes on function-based project macros, deletes related tests, and updates docs.
project(event, do: ...)andproject(event, metadata, do: ...).project(event, fn multi -> ... end)andproject(event, metadata, fn multi -> ... end).lib/commanded/projections/ecto.ex; retained function-basedproject/2andproject/3and batch APIs.test/projections/deprecated_projection_test.exs.guides/explanations/fork-differences.mdto document the breaking change and migration guidance.Written by Cursor Bugbot for commit 9cbd2fa. This will update automatically on new commits. Configure here.