Untangle compile cycles: split Mv.Config + extract the join-request workflow #538
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: local-it/mitgliederverwaltung#538
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
The codebase has 36 dependency cycles (several via compile-time edges → recompilation cascades). Two hubs drive
most of them:
Mv.Config(a 720-LOC accessor present in the majority of cycles) and theMv.Membershipdomainmodule (which embeds a 500+ LOC join-request workflow and pulls Emails/Router into compile cycles).
Scope — two ordered sub-tracks (CI green each step)
Track A — split
Mv.Config(720 LOC). Extract per-domain config modules (Config.Smtp,Config.Oidc,Config.Vereinfacht,Config.Import), one per step, keeping a thin facade if needed so call sites compile eachstep. Each context then depends only on its config slice.
Track B — extract the join-request workflow.
dispatch, token generation, member promotion) out of
lib/.../membership.ex:392-900into its own module; thedomain module becomes a thin facade.
JoinNotifierindirection as the only link between the domain and the web layer.
Acceptance criteria
Mv.ConfigandMv.Membershipmaterially thinner.mix xref graph --format statsshows the cycle count materially reduced (record before/after); thedomain→Emails→Router compile cycles are gone.
mix compileandjust ci-devgreen after each step.Note
Track A pairs with the "Split global_settings + fees_component" issue (global_settings consumes the config).