Skip to content
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
15 changes: 0 additions & 15 deletions cmd/gazelle/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@ load("@bazel_gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle_binary")
gazelle_binary(
name = "gazelle",
languages = DEFAULT_LANGUAGES,
msan = "off",
pure = "off",
race = "off",
static = "off",
visibility = ["//visibility:public"],
)

gazelle_binary(
name = "gazelle_pure",
languages = DEFAULT_LANGUAGES,
msan = "off",
pure = "on",
race = "off",
static = "off",
tags = ["manual"],
visibility = ["//visibility:public"],
)

Expand Down
17 changes: 5 additions & 12 deletions internal/gazelle_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ load(
"GoArchive",
"go_context",
)
load(
"@io_bazel_rules_go//go/private:rules/transition.bzl",
"go_transition_rule",
"go_transition_wrapper",
)

def _gazelle_binary_impl(ctx):
go = go_context(ctx)
Expand Down Expand Up @@ -99,13 +94,11 @@ _gazelle_binary_kwargs = {

gazelle_binary = rule(**_gazelle_binary_kwargs)

# DEPRECATED(#803): go_transition_rule and go_transition_wrapper are internal
# to rules_go and should not be used. The mode attributes supported by this
# are deprecated, and support for them should be dropped after v0.22.0.
gazelle_transition_binary = go_transition_rule(**_gazelle_binary_kwargs)

def gazelle_binary_wrapper(name, **kwargs):
go_transition_wrapper(gazelle_binary, gazelle_transition_binary, name = name, **kwargs)
def gazelle_binary_wrapper(**kwargs):
for key in ("goos", "goarch", "static", "msan", "race", "pure", "strip", "debug", "linkmode", "gotags"):
if key in kwargs:
fail("gazelle_binary attribute '%s' is no longer supported (https://github.com/bazelbuild/bazel-gazelle/issues/803)" % key)
gazelle_binary(**kwargs)

def _format_import(importpath):
_, _, base = importpath.rpartition("/")
Expand Down