-
Notifications
You must be signed in to change notification settings - Fork 171
Refactor Cobalt GN targets to use private deps, instead of public_deps #7846
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
base: main
Are you sure you want to change the base?
Conversation
This change moves :cobalt_shell_switches and :cobalt_shell_lib_deps from public_deps to deps in cobalt_shell_lib. It also moves :cobalt_shell_app_deps to deps in cobalt_shell_app. This required adding explicit dependencies to several targets that were previously relying on transitive public dependencies from cobalt_shell_lib.
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly refactors dependencies in cobalt_shell_lib and cobalt_shell_app by moving them from public_deps to deps. This improves build encapsulation by reducing transitive dependencies. The consequential changes to add explicit dependencies in other targets seem correct. I found one critical issue where an Android-specific dependency is added unconditionally, which will break builds on other platforms. Please see my comment for details.
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request refactors dependencies in the GN build files, moving cobalt_shell_switches and cobalt_shell_lib_deps from public_deps to deps in cobalt_shell_lib, and cobalt_shell_app_deps to deps in cobalt_shell_app. This change correctly reflects the direct dependencies of these targets and ensures that other targets explicitly declare their dependencies, improving build clarity and preventing unintended transitive dependencies. The changes are well-aligned with good dependency management practices.
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request is a significant and valuable refactoring of the GN build dependencies. Moving dependencies from public_deps to deps is a great step towards improving build hygiene and reducing transitive dependencies. The changes are extensive and appear to be correctly implemented across all the modified BUILD.gn files. I have one minor suggestion to improve the sorting of a dependency list with a conditional dependency.
This PR refactors GN build dependencies. The primary goal is to improve build hygiene and modularity by reducing
transitive dependency "leakage."
The two main categories of changes are:
cobalt_shell_lib,cobalt_shell_app, and various test support libraries.Bug: 457596041