Skip to content

Commit

Permalink
Fix lost x_defs on test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
bozaro committed Apr 29, 2022
1 parent 8553d97 commit 383c3b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/private/rules/test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,11 @@ def _recompile_external_deps(go, external_source, internal_archive, library_labe
# can't import anything that imports itself.
internal_source = internal_archive.source
internal_deps = [dep for dep in internal_source.deps if not need_recompile[get_archive(dep).data.label]]
x_defs = dict(internal_source.x_defs)
x_defs.update(internal_archive.x_defs)
attrs = structs.to_dict(internal_source)
attrs["deps"] = internal_deps
attrs["x_defs"] = x_defs
internal_source = GoSource(**attrs)
internal_archive = go.archive(go, internal_source, _recompile_suffix = ".recompileinternal")

Expand Down

0 comments on commit 383c3b9

Please sign in to comment.