Skip to content

Commit 110f8e2

Browse files
tcnghiapcj
authored andcommitted
Fix go_proto_library to avoid changing input args (#200)
1 parent 7c8c80b commit 110f8e2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

go/rules.bzl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@ def go_proto_library(
6868
verbose = 0,
6969
**kwargs):
7070

71+
resolved_go_proto_deps = [] + go_proto_deps
7172
if not go_proto_deps:
7273
if with_grpc:
73-
go_proto_deps = GRPC_COMPILE_DEPS
74+
resolved_go_proto_deps = GRPC_COMPILE_DEPS
7475
else:
75-
go_proto_deps = PB_COMPILE_DEPS
76+
resolved_go_proto_deps = PB_COMPILE_DEPS
7677

7778
if importpath:
7879
go_prefix = None
@@ -107,6 +108,6 @@ def go_proto_library(
107108
go_library(
108109
name = name,
109110
srcs = srcs + [name + ".pb"],
110-
deps = depset(deps + proto_deps + go_proto_deps).to_list(),
111+
deps = depset(deps + proto_deps + resolved_go_proto_deps).to_list(),
111112
importpath = importpath,
112113
**kwargs)

0 commit comments

Comments
 (0)