refactor(providers): break remaining transitive app_providers dependency cycle#4720
Merged
NotThatKindOfDrLiz merged 2 commits intoMay 25, 2026
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
…viders a pure barrel Move createBlockedAuthorFilter into moderation_providers.dart — its only dependencies (contentBlocklistRepositoryProvider, contentPolicyEngineProvider) already live there — and reduce app_providers.dart to export-only. This removes the last symbol that forced split leaf modules to import the aggregator back, so the aggregator no longer participates in a dependency cycle. moderation_providers itself now imports auth/repository directly instead of the aggregator (dropping the feedAspectRatio hide that only existed to avoid the barrel re-export collision). Refs #4554.
…barrel Replace the app_providers.dart import with direct sibling-leaf imports across the remaining 30 provider modules, matching the pattern already used by social_providers/upload_media_providers. This breaks the transitive aggregator -> (export) leaf -> (import) aggregator cycle that the #4506 split left behind: no file under lib/providers/ imports the aggregator anymore. The ~130 screen/widget/router consumers intentionally stay on the barrel re-export — that is the separate #4339 compatibility-barrel removal. Pure import-path change; no runtime behavior change and generated files unaffected. Closes #4554.
a3d7b4a to
635d654
Compare
Mobile PR PreviewPreview refreshed for Last refresh:
|
NotThatKindOfDrLiz
approved these changes
May 25, 2026
Member
NotThatKindOfDrLiz
left a comment
There was a problem hiding this comment.
Reviewed locally. Import rewiring and helper relocation are safe; no findings.
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.
Description
Follow-up cleanup to the #4506 split. This PR removes the remaining transitive
app_providers.dartdependency cycle insidemobile/lib/providers/by relocatingcreateBlockedAuthorFilterintomoderation_providers.dart, reducingapp_providers.dartto a pure compatibility barrel, and redirecting provider-layer imports to direct sibling leaf modules.Result: no file under
lib/providers/importsapp_providers.dartanymore, so the aggregator no longer participates in the cycle. External consumers still resolve the same symbols through the compatibility exports, so behavior remains unchanged.Related Issue: Refs #4554
Out of Scope
app_providers.dartVerification
flutter analyze lib test integration_testflutter test test/providersdart run build_runner build --delete-conflicting-outputsproduced no generated diffType of Change