From e7bc34a3f21a36a264675982c0e9fae545e115c4 Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Fri, 9 Aug 2024 21:00:43 -0400 Subject: [PATCH] Remove orig_src_map --- go/private/actions/archive.bzl | 1 - go/private/context.bzl | 2 -- go/private/rules/test.bzl | 1 - go/providers.rst | 5 ----- 4 files changed, 9 deletions(-) diff --git a/go/private/actions/archive.bzl b/go/private/actions/archive.bzl index df807e015f..54c20bf3e5 100644 --- a/go/private/actions/archive.bzl +++ b/go/private/actions/archive.bzl @@ -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()), diff --git a/go/private/context.bzl b/go/private/context.bzl index c2c02effff..30649830ab 100644 --- a/go/private/context.bzl +++ b/go/private/context.bzl @@ -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 @@ -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": {}, diff --git a/go/private/rules/test.bzl b/go/private/rules/test.bzl index eae6c72d59..ed4c3ddba4 100644 --- a/go/private/rules/test.bzl +++ b/go/private/rules/test.bzl @@ -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), diff --git a/go/providers.rst b/go/providers.rst index a2361ac198..df88137a92 100644 --- a/go/providers.rst +++ b/go/providers.rst @@ -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`` |