Skip to content

Commit 31c9e11

Browse files
committed
Stop including deprecated properties in context by default
1 parent 38267f6 commit 31c9e11

File tree

10 files changed

+10
-15
lines changed

10 files changed

+10
-15
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 = go_context(ctx, include_deprecated_properties = False)
35+
go = go_context(ctx)
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
@@ -313,7 +313,7 @@ _gomock_prog_gen = rule(
313313
)
314314

315315
def _gomock_prog_exec_impl(ctx):
316-
go = go_context(ctx, include_deprecated_properties = False)
316+
go = go_context(ctx)
317317

318318
args = ["-exec_only", ctx.file.prog_bin.path]
319319
args, needed_files = _handle_shared_args(ctx, args)

go/private/context.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ default_go_config_info = GoConfigInfo(
457457
def go_context(
458458
ctx,
459459
attr = None,
460-
include_deprecated_properties = True,
460+
include_deprecated_properties = False,
461461
importpath = None,
462462
importmap = None,
463463
embed = None,

go/private/rules/binary.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ def _go_binary_impl(ctx):
117117
"""go_binary_impl emits actions for compiling and linking a go executable."""
118118
go = go_context(
119119
ctx,
120-
include_deprecated_properties = False,
121120
importpath = ctx.attr.importpath,
122121
embed = ctx.attr.embed,
123122
# It's a list because it is transitioned.

go/private/rules/library.bzl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def _go_library_impl(ctx):
3838
"""Implements the go_library() rule."""
3939
go = go_context(
4040
ctx,
41-
include_deprecated_properties = False,
4241
importpath = ctx.attr.importpath,
4342
importmap = ctx.attr.importmap,
4443
importpath_aliases = ctx.attr.importpath_aliases,
@@ -209,7 +208,7 @@ go_library = rule(
209208

210209
def _go_tool_library_impl(ctx):
211210
"""Implements the go_tool_library() rule."""
212-
go = go_context(ctx, include_deprecated_properties = False)
211+
go = go_context(ctx)
213212

214213
go_info = new_go_info(go, ctx.attr)
215214
archive = go.archive(go, go_info)

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, include_deprecated_properties = False)
41+
go = go_context(ctx)
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
@@ -28,7 +28,7 @@ load(
2828

2929
def _go_source_impl(ctx):
3030
"""Implements the go_source() rule."""
31-
go = go_context(ctx, include_deprecated_properties = False)
31+
go = go_context(ctx)
3232
go_info = new_go_info(go, ctx.attr)
3333
return [
3434
go_info,

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, include_deprecated_properties = False)
33+
go = go_context(ctx)
3434
return go.toolchain.actions.stdlib(go)
3535

3636
stdlib = rule(

go/private/rules/test.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ def _go_test_impl(ctx):
5959

6060
go = go_context(
6161
ctx,
62-
include_deprecated_properties = False,
6362
importpath = ctx.attr.importpath,
6463
embed = ctx.attr.embed,
6564
# It's a list because it is transitioned.

proto/compiler.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ compiler. Typically, these are Well Known Types and proto runtime libraries.""",
9494
"valid_archive": """A Boolean indicating whether the .go files produced
9595
by this compiler are buildable on their own. Compilers that just add methods
9696
to structs produced by other compilers will set this to False.""",
97-
"always_generates": """A Boolean indicating whether this compiler
98-
always generates files, regardless of whether the proto files have
97+
"always_generates": """A Boolean indicating whether this compiler
98+
always generates files, regardless of whether the proto files have
9999
relevant definitions (e.g., services for grpc_gateway). This allows
100100
more strict check of compiler output.""",
101101
"internal": "Opaque value containing data used by compile.",
@@ -217,7 +217,7 @@ def proto_path(src, proto):
217217
return src.path[len(prefix):]
218218

219219
def _go_proto_compiler_impl(ctx):
220-
go = go_context(ctx, include_deprecated_properties = False)
220+
go = go_context(ctx)
221221
go_info = new_go_info(go, ctx.attr)
222222
proto_toolchain = _find_toolchain(
223223
ctx,

proto/def.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ declares the \"{attr_name}\" attribute.""".format(
8383
go = go_context(
8484
ctx,
8585
attr,
86-
include_deprecated_properties = False,
8786
importpath = attr.importpath,
8887
go_context_data = attr._go_context_data,
8988
)
@@ -111,7 +110,6 @@ def _proto_library_to_source(_go, attr, source, merge):
111110
def _go_proto_library_impl(ctx):
112111
go = go_context(
113112
ctx,
114-
include_deprecated_properties = False,
115113
importpath = ctx.attr.importpath,
116114
importmap = ctx.attr.importmap,
117115
importpath_aliases = ctx.attr.importpath_aliases,

0 commit comments

Comments
 (0)