Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mode from GoArchive #4028

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion go/private/actions/archive.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -218,5 +218,4 @@ def emit_archive(go, source = None, _recompile_suffix = "", recompile_internal_d
cgo_deps = depset(transitive = [cgo_deps] + [a.cgo_deps for a in direct]),
cgo_exports = cgo_exports,
runfiles = runfiles,
mode = go.mode,
fmeum marked this conversation as resolved.
Show resolved Hide resolved
)
10 changes: 5 additions & 5 deletions go/private/tools/path.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ load(
"GoArchive",
"GoPath",
"effective_importpath_pkgpath",
"get_archive",
)

def _go_path_impl(ctx):
Expand All @@ -35,10 +34,11 @@ def _go_path_impl(ctx):
# package may also appear in different modes.
mode_to_deps = {}
for dep in ctx.attr.deps:
archive = get_archive(dep)
if archive.mode not in mode_to_deps:
mode_to_deps[archive.mode] = []
mode_to_deps[archive.mode].append(archive)
archive = dep[GoArchive]
mode = archive.source.mode
if mode not in mode_to_deps:
mode_to_deps[mode] = []
mode_to_deps[mode].append(archive)
mode_to_archive = {}
for mode, archives in mode_to_deps.items():
direct = [a.data for a in archives]
Expand Down
4 changes: 0 additions & 4 deletions go/providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,6 @@ which is available through the :param:`data` field.
+--------------------------------+-----------------------------------------------------------------+
| The files needed to run anything that includes this library. |
+--------------------------------+-----------------------------------------------------------------+
| :param:`mode` | :type:`Mode` |
+--------------------------------+-----------------------------------------------------------------+
| The mode this archive was compiled in. |
+--------------------------------+-----------------------------------------------------------------+

GoPath
~~~~~~
Expand Down