Skip to content

Commit

Permalink
Remove orig_src_map (#4025)
Browse files Browse the repository at this point in the history
**What type of PR is this?**
Code cleanup. I don't see this being used and it seems it has not been
for 6+ years.

**What does this PR do? Why is it needed?**

**Which issues(s) does this PR fix?**

Fixes #

**Other notes for review**
  • Loading branch information
dzbarsky authored Aug 10, 2024
1 parent dfbf8b1 commit 8c707c8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion go/private/actions/archive.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def emit_archive(go, source = None, _recompile_suffix = "", recompile_internal_d
# GoSource fields
srcs = as_tuple(source.srcs),
orig_srcs = as_tuple(source.orig_srcs),
_orig_src_map = tuple([source.orig_src_map.get(src, src) for src in source.srcs]),
_cover = as_tuple(source.cover),
_embedsrcs = as_tuple(source.embedsrcs),
_x_defs = tuple(source.x_defs.items()),
Expand Down
2 changes: 0 additions & 2 deletions go/private/context.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ def _merge_embed(source, embed):
s = get_source(embed)
source["srcs"] = s.srcs + source["srcs"]
source["orig_srcs"] = s.orig_srcs + source["orig_srcs"]
source["orig_src_map"].update(s.orig_src_map)
source["embedsrcs"] = source["embedsrcs"] + s.embedsrcs
source["cover"] = source["cover"] + s.cover
source["deps"] = source["deps"] + s.deps
Expand Down Expand Up @@ -277,7 +276,6 @@ def _library_to_source(go, attr, library, coverage_instrumented):
"mode": go.mode,
"srcs": srcs,
"orig_srcs": srcs,
"orig_src_map": {},
"cover": [],
"embedsrcs": embedsrcs,
"x_defs": {},
Expand Down
1 change: 0 additions & 1 deletion go/private/rules/test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,6 @@ def _recompile_external_deps(go, external_source, internal_archive, library_labe
mode = go.mode,
srcs = as_list(arc_data.srcs),
orig_srcs = as_list(arc_data.orig_srcs),
orig_src_map = dict(zip(arc_data.srcs, arc_data._orig_src_map)),
cover = arc_data._cover,
embedsrcs = as_list(arc_data._embedsrcs),
x_defs = dict(arc_data._x_defs),
Expand Down
5 changes: 0 additions & 5 deletions go/providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ method. In general, only rules_go should need to build or handle these.
| The original source files this library is based on. This may differ from |
| :param:`srcs` if processing tools such as cgo or cover are applied. |
+--------------------------------+-----------------------------------------------------------------+
| :param:`orig_src_map` | :type:`dict of File to File` |
+--------------------------------+-----------------------------------------------------------------+
| Maps generated files in :param:`srcs` back to :param:`orig_srcs`. Not all |
| generated files may appear in here. |
+--------------------------------+-----------------------------------------------------------------+
| :param:`embedsrcs` | :type:`list of File` |
+--------------------------------+-----------------------------------------------------------------+
| Files that may be embedded into the compiled package using ``//go:embed`` |
Expand Down

0 comments on commit 8c707c8

Please sign in to comment.