Skip to content

Commit 8f3deeb

Browse files
authored
Migrate uses of struct.to_proto (#6801)
Reapplies #6778 after #6721 inadvertently reverted part of it. The "to_proto" method on Starlark structs is deprecated and shouldn't be used. Instead, the proto module's "encode_text" function should be used. (https://bazel.build/rules/lib/toplevel/proto) It, along with "to_json", can be disabled in Bazel using the flag --incompatible_struct_has_no_methods The underlying implementation is the same, so there should be no observable changes in final outputs.
1 parent c01e0bc commit 8f3deeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorboard/defs/web.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def _tf_web_library(ctx):
112112
],
113113
)
114114
params_file = _new_file(ctx, "-params.pbtxt")
115-
ctx.actions.write(output = params_file, content = params.to_proto())
115+
ctx.actions.write(output = params_file, content = proto.encode_text(params))
116116
ctx.actions.write(
117117
is_executable = True,
118118
output = ctx.outputs.executable,

0 commit comments

Comments
 (0)