Skip to content

Commit 791cf59

Browse files
committed
Remove deprecated from builtins
1 parent 7cdfea0 commit 791cf59

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

extras/gomock.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ _MOCKGEN_TOOL = Label("//extras/gomock:mockgen")
3232
_MOCKGEN_MODEL_LIB = Label("//extras/gomock:mockgen_model")
3333

3434
def _gomock_source_impl(ctx):
35-
go_ctx = go_context(ctx)
35+
go = go_context(ctx, include_deprecated_properties = False)
3636

3737
# In Source mode, it's not necessary to pass through a library, as the only thing we use it for is setting up
3838
# the relative file locations. Forcing users to pass a library makes it difficult in the case where a mock should
@@ -73,7 +73,7 @@ def _gomock_source_impl(ctx):
7373
needed_files.append(aux)
7474
args += ["-aux_files", ",".join(aux_files)]
7575

76-
sdk = go_ctx.sdk
76+
sdk = go.sdk
7777

7878
inputs_direct = needed_files + [source]
7979
inputs_transitive = [sdk.tools, sdk.headers, sdk.srcs]

go/private/rules/binary.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def new_cc_import(
9696

9797
def _go_binary_impl(ctx):
9898
"""go_binary_impl emits actions for compiling and linking a go executable."""
99-
go = go_context(ctx)
99+
go = go_context(ctx, include_deprecated_properties = False)
100100

101101
is_main = go.mode.link not in (LINKMODE_SHARED, LINKMODE_PLUGIN)
102102
library = go.new_library(go, importable = False, is_main = is_main)

go/private/rules/library.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ load(
3434

3535
def _go_library_impl(ctx):
3636
"""Implements the go_library() rule."""
37-
go = go_context(ctx)
37+
go = go_context(ctx, include_deprecated_properties = False)
3838
library = go.new_library(go)
3939
source = go.library_to_source(go, ctx.attr, library, ctx.coverage_instrumented())
4040
archive = go.archive(go, source)

go/private/rules/nogo.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _nogo_impl(ctx):
3838
return None
3939

4040
# Generate the source for the nogo binary.
41-
go = go_context(ctx)
41+
go = go_context(ctx, include_deprecated_properties = False)
4242
nogo_main = go.declare_file(go, path = "nogo_main.go")
4343
nogo_args = ctx.actions.args()
4444
nogo_args.add("gennogomain")

go/private/rules/source.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ load(
2727

2828
def _go_source_impl(ctx):
2929
"""Implements the go_source() rule."""
30-
go = go_context(ctx)
30+
go = go_context(ctx, include_deprecated_properties = False)
3131
library = go.new_library(go)
3232
source = go.library_to_source(go, ctx.attr, library, ctx.coverage_instrumented())
3333
return [

go/private/rules/stdlib.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ load(
3030
)
3131

3232
def _stdlib_impl(ctx):
33-
go = go_context(ctx)
33+
go = go_context(ctx, include_deprecated_properties = False)
3434
return go.toolchain.actions.stdlib(go)
3535

3636
stdlib = rule(

go/private/rules/test.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def _go_test_impl(ctx):
5656
It emits an action to run the test generator, and then compiles the
5757
test into a binary."""
5858

59-
go = go_context(ctx)
59+
go = go_context(ctx, include_deprecated_properties = False)
6060

6161
# Compile the library to test with internal white box tests
6262
internal_library = go.new_library(go, testfilter = "exclude")

proto/compiler.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def proto_path(src, proto):
182182
return src.path[len(prefix):]
183183

184184
def _go_proto_compiler_impl(ctx):
185-
go = go_context(ctx)
185+
go = go_context(ctx, include_deprecated_properties = False)
186186
library = go.new_library(go)
187187
source = go.library_to_source(go, ctx.attr, library, ctx.coverage_instrumented())
188188
proto_toolchain = proto_toolchains.find_toolchain(

proto/def.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def get_imports(attr, importpath):
6767
return depset(direct = direct.keys(), transitive = transitive)
6868

6969
def _go_proto_aspect_impl(_target, ctx):
70-
go = go_context(ctx, ctx.rule.attr)
70+
go = go_context(ctx, ctx.rule.attr, include_deprecated_properties = False)
7171
imports = get_imports(ctx.rule.attr, go.importpath)
7272
return [GoProtoImports(imports = imports)]
7373

@@ -90,7 +90,7 @@ def _proto_library_to_source(_go, attr, source, merge):
9090
merge(source, compiler[GoSource])
9191

9292
def _go_proto_library_impl(ctx):
93-
go = go_context(ctx)
93+
go = go_context(ctx, include_deprecated_properties = False)
9494
if ctx.attr.compiler:
9595
#TODO: print("DEPRECATED: compiler attribute on {}, use compilers instead".format(ctx.label))
9696
compilers = [ctx.attr.compiler]

0 commit comments

Comments
 (0)