-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add is_root struct field to bazel_module #15792
Conversation
@meteorcloudy @Wyverald This seemed straightforward enough for me to go for a PR right away. If you want to discuss the approach more generally, I could create a feature request instead. |
This allows module extensions to check whether a given module is the root module, which is necessary to implement the analogues of --check_direct_dependencies and archive_override/git_override for dependencies managed by extensions.
@Wyverald I thought we already have a way to tell which one is the root module. IIUC, the modules are listed in BFS order, so the first module must be root module, is that right? |
The modules are listed in BFS order, but seem to be filtered to include only those that use the given extension, meaning that the root module may not even appear in the list: bazel/src/main/java/com/google/devtools/build/lib/bazel/bzlmod/SingleExtensionUsagesFunction.java Line 57 in 0152338
|
Oh, I see! Then this change looks good to me, but waiting for @Wyverald to confirm! |
Modules can use the `go_dep` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_dep.mod`). HTTP and VCS Go repositories can be implemented for the root module once bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_dep` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_dep.mod`). HTTP and VCS Go repositories can be implemented for the root module once bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_dep` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_dep.mod`). HTTP and VCS Go repositories can be implemented for the root module once bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_dep` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_dep.mod`). HTTP and VCS Go repositories can be implemented for the root module once bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
@bazel-io flag |
Modules can use the `go_dep` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_dep.mod`). HTTP and VCS Go repositories can be implemented for the root module once bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_dep` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_dep.mod`). HTTP and VCS Go repositories can be implemented for the root module once bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
@bazel-io fork 5.3.0 |
@bazel-io fork 5.3.0 |
This allows module extensions to check whether a given module is the root module, which is necessary to implement the analogues of --check_direct_dependencies and archive_override/git_override for dependencies managed by extensions. Closes #15792. PiperOrigin-RevId: 459058350 Change-Id: I4a08ce80a636e2cb2791323476fdccddf4131de0 Co-authored-by: Fabian Meumertzheim <[email protected]>
Modules can use the `go_dep` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_dep.module`). HTTP and VCS Go repositories can be implemented for the root module only using the new bazel_module.is_root field added in bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_dep` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_dep.module`). HTTP and VCS Go repositories can be implemented for the root module only using the new bazel_module.is_root field added in bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_deps` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_deps.module`). HTTP and VCS Go repositories can be implemented for the root module only using the new bazel_module.is_root field added in bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_deps` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_deps.module`). HTTP and VCS Go repositories can be implemented for the root module only using the new bazel_module.is_root field added in bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_deps` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_deps.module`). HTTP and VCS Go repositories can be implemented for the root module only using the new bazel_module.is_root field added in bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_deps` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_deps.module`). HTTP and VCS Go repositories can be implemented for the root module only using the new bazel_module.is_root field added in bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_deps` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_deps.module`). HTTP and VCS Go repositories can be implemented for the root module only using the new bazel_module.is_root field added in bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_deps` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_deps.module`). HTTP and VCS Go repositories can be implemented for the root module only using the new bazel_module.is_root field added in bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_deps` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_deps.module`). HTTP and VCS Go repositories can be implemented for the root module only using the new bazel_module.is_root field added in bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
Modules can use the `go_deps` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_deps.module`). HTTP and VCS Go repositories can be implemented for the root module only using the new bazel_module.is_root field added in bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override.
* Prototype of bzlmod-powered transitive dependencies Modules can use the `go_deps` module extension to define Go dependencies. Only Go module dependencies are supported for now (`go_deps.module`). HTTP and VCS Go repositories can be implemented for the root module only using the new bazel_module.is_root field added in bazelbuild/bazel#15792 has been merged. They should follow the semantics of archive_override/git_override. * Update internal/bzlmod/go_deps.bzl Co-authored-by: Zhongpeng Lin <[email protected]> Co-authored-by: Zhongpeng Lin <[email protected]>
This allows module extensions to check whether a given module is the
root module, which is necessary to implement the analogues of
--check_direct_dependencies and archive_override/git_override for
dependencies managed by extensions.