Skip to content

Conversation

@ObsidianMinor
Copy link

This fixes rust_library_group and rust_prost_library for experimental_use_cc_common_link

Closes #3786

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Is there a unit test you could add somewhere in //test/unit or something? Would love to have some protection against regressions.

@ObsidianMinor
Copy link
Author

Yeah I was wondering where I should put that, since there's only one test I think actually exercising this experimental flag and the configuration looks mildly complex. But I'll see if I can add something to it.

… for use_cc_common_link

Certain code written before crate groups were introduced wasn't adjusted to traverse
groups, specifically code that traverses crate deps to discover cc_info. collect_deps
properly does flatten crate_groups, so this moves the code for flattening a list of
DepVariantInfo into a utility function, 'flatten_crate_groups'.

This fixes rust_library_group and rust_prost_library for experimental_use_cc_common_link.
@ObsidianMinor ObsidianMinor force-pushed the fix/crate-group-common-link branch from 6983cb3 to ac7d5c0 Compare December 23, 2025 05:21
@ObsidianMinor
Copy link
Author

Turns out with further testing there's more places that don't account for crate groups. So this patch was incomplete and would fix direct dependencies, but not indirect dependencies, which happens during establish_cc_info. I've updated it to factor out the crate group flattening into a separate function plus the added tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CrateGroupInfo cannot provide CcInfo dependencies for experimental_cc_common_link

2 participants