Skip to content

Commit

Permalink
Try another workaround for bazel-contrib/rules_go#4154 and bazel-cont…
Browse files Browse the repository at this point in the history
  • Loading branch information
phst committed Jan 9, 2025
1 parent 6d4e84b commit e8fe543
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@ jobs:
repository-cache: true
- name: Run tests
shell: bash
run: |
make check BAZEL=bazelisk
# Work around https://github.com/bazel-contrib/rules_go/issues/4154 and
# https://github.com/bazel-contrib/bazel-gazelle/issues/1393. See
# https://github.com/bazel-contrib/rules_go/issues/4154#issuecomment-2433739889.
run: >-
make check
BAZEL=bazelisk
BAZELFLAGS='--@rules_go//go/config:pure --define=gotags=purego'
11 changes: 11 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ bazel_dep(name = "gazelle", version = "0.41.0")

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "go.mod")

# Work around https://github.com/bazel-contrib/rules_go/issues/4154 and
# https://github.com/bazel-contrib/bazel-gazelle/issues/1393. See
# https://github.com/bazel-contrib/rules_go/issues/4154#issuecomment-2433739889.
go_deps.gazelle_override(
directives = [
"gazelle:build_tags purego",
"gazelle:exclude **/*_amd64*",
],
path = "github.com/cloudflare/circl",
)
use_repo(
go_deps,
"com_github_bazelbuild_buildtools",
Expand Down

0 comments on commit e8fe543

Please sign in to comment.