You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the go_busybox rule cmds field currently requires each target to be listed individually (no aggregators like :... or :all) and requires each target to be an absolute label (no :foobar labels).
This is due to the fact that go_busybox is currently a macro that expands to many rules:
go_busybox is a rule that generates many GoLibrary rules (one for each cmd), and then one GoBinary that depends on all those GoLibrarys (the busybox command). The deps field of the GoSource provider is technically required to be a list of Target (which each provide GoArchive). If we consolidated all those macro-generated rules into one rule, GoSource.deps would have to depend on a list of Target or GoArchive, because there would be no targets to depend on for the individual command libraries. In practice, GoSource.depsdoes accept list of Target or GoArchive right now, but rules_go wants to drop that ability. We'll need to convince them not to, or ask what it's about.
the
go_busybox
rule cmds field currently requires each target to be listed individually (no aggregators like :... or :all) and requires each target to be an absolute label (no :foobar labels).This is due to the fact that
go_busybox
is currently a macro that expands to many rules:gobusybox/src/gobb2.bzl
Line 275 in fa615d9
That's like that for 2 reasons, today:
every rule can only generate one go.archive at the moment because they will all be named "%s.a" % ctx.attr.name. That is fixed with archive: use library's name for archive name bazel-contrib/rules_go#2652, but not released in rules_go yet.
go_busybox
is a rule that generates many GoLibrary rules (one for each cmd), and then one GoBinary that depends on all those GoLibrarys (the busybox command). Thedeps
field of theGoSource
provider is technically required to be alist of Target (which each provide GoArchive)
. If we consolidated all those macro-generated rules into one rule,GoSource.deps
would have to depend on alist of Target or GoArchive
, because there would be no targets to depend on for the individual command libraries. In practice,GoSource.deps
does acceptlist of Target or GoArchive
right now, but rules_go wants to drop that ability. We'll need to convince them not to, or ask what it's about.See actions.archive's resolution of deps calling get_archive (the "type == struct" thing is for when a
GoArchive
is directly supplied).In particular, see this comment saying
Refers to #1784, which I suppose I'll comment on.
The text was updated successfully, but these errors were encountered: