Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency cleanup #8001

Closed
wants to merge 3 commits into from
Closed

Dependency cleanup #8001

wants to merge 3 commits into from

Conversation

wmontwe
Copy link
Collaborator

@wmontwe wmontwe commented Jul 1, 2024

This is a first step to cleanup the project dependencies and declare transient dependencies better.

@wmontwe wmontwe requested a review from cketti as a code owner July 1, 2024 15:45
implementation(libs.timber)

testImplementation(libs.robolectric)
testImplementation(libs.robolectric.shadows)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API surface of org.robolectric:shadows-framework is part of org.robolectric:robolectric's API surface. We'll never use the shadows framework independently of Robolectric. Why include a direct dependency?

@@ -3,9 +3,13 @@ plugins {
}

dependencies {
api(projects.app.core)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make :app:core part of :feature:widget:message-list's API surface? Ideally a feature module would never make any of its dependencies part of its public API.

implementation(projects.app.ui.legacy)
implementation(projects.app.core)
implementation(projects.core.ui.legacy.designsystem)
implementation(projects.mail.common)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like this should be tackled once we actually work on removing the dependency on :app:core. Chances are that will also get rid of the :mail:common dependency. It doesn't feel like adding a direct dependency on :mail:common now while also keeping the :app:core dependency adds any value.


implementation(libs.preferencex)
api(libs.preferencex)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make this particular library an API dependency?

Comment on lines +6 to +9
api(projects.app.core)
api(projects.app.ui.base)
api(projects.app.ui.legacy)
api(projects.mail.common)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dramatically increases the API surface of the feature module. Why?

@wmontwe
Copy link
Collaborator Author

wmontwe commented Jul 18, 2024

This is a partial change to the dependencies setup and not complete. So there are ìmplementation to api changes that are only necessary for this intermediate step. Looking at the current priorities and time consumption to reach a final version, I will remove the ìmplementation to api changes and just keep the declaration of transient dependencies.

The rest will be continued when there is more time available.

@wmontwe
Copy link
Collaborator Author

wmontwe commented Jul 22, 2024

As this is not crucial at the moment, I'll close this and continue at a later point

@wmontwe wmontwe closed this Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants