Why do feature modules explicitly depend on both domain and data, even though domain already re-exports data? #1932
Unanswered
minjun011026
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
In this project, I noticed that feature modules like foryou, interests, and search include both domain and data as implementation dependencies.
However, the domain module already uses
api(projects.core.data)
, which means it re-exports the public APIs of the data module. This should make data accessible to any module that depends on domain.Given that feature modules interact with interfaces and don't need to access internal implementations from data, it seems that depending on domain alone would be sufficient.
So, why do feature modules still explicitly include data as a dependency?
Is it mainly to make the dependency graph more explicit and easier for developers to understand, even if it's technically redundant?
Or is there another reason for this setup?
I’d appreciate any clarification on this design decision.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions