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

Go/Bazel: fix gazelle invocation to use bundled bazel go #17145

Merged
merged 2 commits into from
Aug 6, 2024
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
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local_path_override(
# see https://registry.bazel.build/ for a list of available packages

bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_go", version = "0.48.0")
bazel_dep(name = "rules_go", version = "0.49.0")
bazel_dep(name = "rules_pkg", version = "0.10.1")
bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1")
bazel_dep(name = "rules_python", version = "0.32.2")
Expand All @@ -23,7 +23,7 @@ bazel_dep(name = "abseil-cpp", version = "20240116.0", repo_name = "absl")
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
bazel_dep(name = "fmt", version = "10.0.0")
bazel_dep(name = "rules_kotlin", version = "1.9.4-codeql.1")
bazel_dep(name = "gazelle", version = "0.37.0")
bazel_dep(name = "gazelle", version = "0.38.0")
bazel_dep(name = "rules_dotnet", version = "0.15.1")
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
bazel_dep(name = "rules_rust", version = "0.46.0")
Expand Down
6 changes: 2 additions & 4 deletions go/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
load("@gazelle//:def.bzl", "gazelle")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files")
load("//misc/bazel:pkg.bzl", "codeql_pack", "codeql_pkg_files")

native_binary(
gazelle(
name = "gazelle",
src = "@gazelle//cmd/gazelle",
out = "gazelle.exe",
args = ["go/extractor"],
)

Expand Down
4 changes: 2 additions & 2 deletions go/extractor/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ go_library(
"//go/extractor/toolchain",
"//go/extractor/trap",
"//go/extractor/util",
"@org_golang_x_mod//modfile:go_default_library",
"@org_golang_x_tools//go/packages:go_default_library",
"@org_golang_x_mod//modfile",
"@org_golang_x_tools//go/packages",
],
)

Expand Down
2 changes: 1 addition & 1 deletion go/extractor/dbscheme/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go/extractor/project/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/extractor/trap/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go/extractor/util/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def options():
opts = options()

try:
workspace_dir = pathlib.Path(os.environ.pop('BUILD_WORKSPACE_DIRECTORY'))
workspace_dir = pathlib.Path(os.environ['BUILD_WORKSPACE_DIRECTORY'])
except KeyError:
print("this should be run with bazel run", file=sys.stderr)
sys.exit(1)
Expand Down
Loading