Skip to content

Commit 9c36eab

Browse files
dzbarskyfmeum
authored andcommitted
review feedback
1 parent fd18dab commit 9c36eab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

go/private/rules/nogo.bzl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ def _nogo_impl(ctx):
4646
if ctx.attr.debug:
4747
nogo_args.add("-debug")
4848
nogo_inputs = []
49-
for dep in ctx.attr.deps:
50-
nogo_args.add("-analyzer_importpath", dep[GoArchive].data.importpath)
49+
analyzer_archives = [dep[GoArchive] for dep in ctx.attr.deps]
50+
analyzer_importpaths = [archive.data.importpath for archive in analyzer_archives]
51+
nogo_args.add_all(analyzer_importpaths, before_each = "-analyzer_importpath")
5152
if ctx.file.config:
5253
nogo_args.add("-config", ctx.file.config)
5354
nogo_inputs.append(ctx.file.config)
@@ -74,7 +75,7 @@ def _nogo_impl(ctx):
7475
nogo_source = go.library_to_source(go, struct(
7576
srcs = [struct(files = [nogo_main])],
7677
embed = [ctx.attr._nogo_srcs],
77-
deps = ctx.attr.deps,
78+
deps = analyzer_archives,
7879
), nogo_library, False)
7980
_, executable, runfiles = go.binary(
8081
go,

0 commit comments

Comments
 (0)