Skip to content

Commit

Permalink
Also take library deps like srcs into account in go context (#3725)
Browse files Browse the repository at this point in the history
  • Loading branch information
mering authored Nov 3, 2023
1 parent df20c98 commit 486b22c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion go/private/context.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ def _library_to_source(go, attr, library, coverage_instrumented):
generated_srcs = getattr(library, "srcs", [])
srcs = attr_srcs + generated_srcs
embedsrcs = [f for t in getattr(attr, "embedsrcs", []) for f in as_iterable(t.files)]
attr_deps = getattr(attr, "deps", [])
generated_deps = getattr(library, "deps", [])
deps = attr_deps + generated_deps
source = {
"library": library,
"mode": go.mode,
Expand All @@ -254,7 +257,7 @@ def _library_to_source(go, attr, library, coverage_instrumented):
"cover": [],
"embedsrcs": embedsrcs,
"x_defs": {},
"deps": getattr(attr, "deps", []),
"deps": deps,
"gc_goopts": _expand_opts(go, "gc_goopts", getattr(attr, "gc_goopts", [])),
"runfiles": _collect_runfiles(go, getattr(attr, "data", []), getattr(attr, "deps", [])),
"cgo": getattr(attr, "cgo", False),
Expand Down

0 comments on commit 486b22c

Please sign in to comment.