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

chore: rules_go is a non-dev dep at HEAD #554

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .bcr/patches/go_dev_dep.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/MODULE.bazel b/MODULE.bazel
index f05c57a..4cb6104 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -28,9 +28,9 @@ register_toolchains(
# To allow /tools to be built from source
# NOTE: when publishing to BCR, we patch this to be dev_dependency, as we publish pre-built binaries
# along with our releases.
-bazel_dep(name = "rules_go", version = "0.41.0", repo_name = "io_bazel_rules_go")
+bazel_dep(name = "rules_go", version = "0.41.0", repo_name = "io_bazel_rules_go", dev_dependency = True)

-go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
+go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps", dev_dependency = True)
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
4 changes: 0 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ jobs:
if: matrix.bzlmodEnabled
run: echo "bzlmod_flag=--enable_bzlmod" >> $GITHUB_OUTPUT

- name: Make dev dependencies available (bzlmod)
if: matrix.bzlmodEnabled
run: sed -i${{ matrix.os == 'macos-latest' && ' ""' || '' }} 's/dev_dependency = True/dev_dependency = False/g' MODULE.bazel

- name: Write rbe credentials
if: ${{ matrix.config == 'rbe' }}
working-directory: ${{ matrix.folder }}
Expand Down
10 changes: 4 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ register_toolchains(
)

# To allow /tools to be built from source
bazel_dep(name = "rules_go", version = "0.41.0", dev_dependency = True, repo_name = "io_bazel_rules_go")
# NOTE: when publishing to BCR, we patch this to be dev_dependency, as we publish pre-built binaries
# along with our releases.
bazel_dep(name = "rules_go", version = "0.41.0", repo_name = "io_bazel_rules_go")

go_deps = use_extension(
"@gazelle//:extensions.bzl",
"go_deps",
dev_dependency = True,
)
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
Expand Down