Make dep_variant_infos a list, not a depset #3644
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For anyone using rust_library_group (or similar, like rules_rs) the current setup forces flattening in every rdep. We can just carry them as a list instead and iterate it directly in the consumers.
We are slightly less efficient now when nesting a library group in a library group (which is probably very rare?).
The prost rules do incur flattening now when
include_transitive_deps
is enabled (which it's not by default, and it seems like a bad practice to not declare your deps properly?). In exchange, I've improved the depset handling for constructing those transitive deps (and I think we could further improve it by not constructing the transitive depset when the toolchain isn't configured to use it...)This is technically a breaking change for folks who have custom rules creating CrateGroupInfo, although the adjustment should be pretty trivial.