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
Given one or many proto_library targets with dependencies, one would like to put them all into a single Swift module.
Currently, it is possible only if labels for all proto_library targets and their dependent targets are manually repeated in the protos attribute of the swift_proto_library rule.
However, this creates a maintenance hell, as each time one of the proto_library targets gets modified, the same change needs to be reflected in this swift_proto_library aggregation target, resulting in two sources of truth.
It would be great if this could be done automatically, by only providing the leaf proto_library targets.
Proposed solution
The idea is to create an aspect that collects ProtoInfo transitively and add an attribute that uses it to the swift_proto_library rule.
Motivation
Given one or many
proto_library
targets with dependencies, one would like to put them all into a single Swift module.Currently, it is possible only if labels for all
proto_library
targets and their dependent targets are manually repeated in theprotos
attribute of theswift_proto_library
rule.However, this creates a maintenance hell, as each time one of the
proto_library
targets gets modified, the same change needs to be reflected in thisswift_proto_library
aggregation target, resulting in two sources of truth.It would be great if this could be done automatically, by only providing the leaf
proto_library
targets.Proposed solution
The idea is to create an aspect that collects
ProtoInfo
transitively and add an attribute that uses it to theswift_proto_library
rule.@AttilaTheFun I'm tagging you as requested :)
The text was updated successfully, but these errors were encountered: