-
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
Polish Bazel external dependencies #20042
Conversation
a3bade0
to
18d39cb
Compare
8b80dd9
to
6600d6f
Compare
f74b5f8
to
fcd9bdd
Compare
distdir_deps.bzl
Outdated
"~grpc_repo_deps_ext~envoy_api", | ||
"~grpc_repo_deps_ext~rules_cc", # TODO: Should be removed | ||
]] | ||
"""WORKSPACE default repository definitions.""" |
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.
IIUC there's no reason this file should be called 'distdir_deps' anymore, right? It only contains information about WORKSPACE suffix repos, which are (for example) not used by Bzlmod builds at all.
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.
Make sense, I renamed it to workspace_deps.bzl
This is a really nice cleanup! I'd like to wait for Tony's review too. |
Clean up and polish Bazel's external dependencies declarations: - Gathered all repository declarations in `repositories.bzl` file. - Removed most of repo definitions in `distdir_deps.bzl` and renamed it to `workspace_deps.bzl`, the rest repo definitions are only used in WORKSPACE suffix and test setup. - Added a repo cache for the workspace repos so that we can decouple repo cache used by - dependencies used to build and test Bazel: cached by `//src:test_repos` - dependencies embedded in MODULE.tools: cached by `@bazel_tools_repo_cache//:files` - dependencies embedded in WORKSPACE suffix: cached by `@workspace_repo_cache//:files` - Removed unused macros from `distdir.bzl` This PR largely simplifies `distdir_deps.bzl`, which is also loaded in internal codebase because `gen_workspace_stanza` is a build rule. Closes bazelbuild#20042. PiperOrigin-RevId: 580212706 Change-Id: I91a9f7bbf89b9af15fdb98f387d95a40a89e7700
Clean up and polish Bazel's external dependencies declarations: - Gathered all repository declarations in `repositories.bzl` file. - Removed most of repo definitions in `distdir_deps.bzl` and renamed it to `workspace_deps.bzl`, the rest repo definitions are only used in WORKSPACE suffix and test setup. - Added a repo cache for the workspace repos so that we can decouple repo cache used by - dependencies used to build and test Bazel: cached by `//src:test_repos` - dependencies embedded in MODULE.tools: cached by `@bazel_tools_repo_cache//:files` - dependencies embedded in WORKSPACE suffix: cached by `@workspace_repo_cache//:files` - Removed unused macros from `distdir.bzl` This PR largely simplifies `distdir_deps.bzl`, which is also loaded in internal codebase because `gen_workspace_stanza` is a build rule. Closes bazelbuild#20042. PiperOrigin-RevId: 580212706 Change-Id: I91a9f7bbf89b9af15fdb98f387d95a40a89e7700
Clean up and polish Bazel's external dependencies declarations: - Gathered all repository declarations in `repositories.bzl` file. - Removed most of repo definitions in `distdir_deps.bzl` and renamed it to `workspace_deps.bzl`, the rest repo definitions are only used in WORKSPACE suffix and test setup. - Added a repo cache for the workspace repos so that we can decouple repo cache used by - dependencies used to build and test Bazel: cached by `//src:test_repos` - dependencies embedded in MODULE.tools: cached by `@bazel_tools_repo_cache//:files` - dependencies embedded in WORKSPACE suffix: cached by `@workspace_repo_cache//:files` - Removed unused macros from `distdir.bzl` This PR largely simplifies `distdir_deps.bzl`, which is also loaded in internal codebase because `gen_workspace_stanza` is a build rule. Closes #20042. PiperOrigin-RevId: 580212706 Change-Id: I91a9f7bbf89b9af15fdb98f387d95a40a89e7700
Clean up and polish Bazel's external dependencies declarations:
repositories.bzl
file.distdir_deps.bzl
and renamed it toworkspace_deps.bzl
, the rest repo definitions are only used in WORKSPACE suffix and test setup.//src:test_repos
@bazel_tools_repo_cache//:files
@workspace_repo_cache//:files
distdir.bzl
This PR largely simplifies
distdir_deps.bzl
, which is also loaded in internal codebase becausegen_workspace_stanza
is a build rule.