Skip to content

Conversation

@scentini
Copy link
Collaborator

@scentini scentini commented Mar 21, 2022

Dependencies of a rust_proc_macro shouldn't propagate to the libraries depending on the rust_proc_macro target.

We ran into this issue in a complex internal build that involved transitions - the final rust_ilbrary had the same crate as input twice, once from the regular exec configuration and once from the transition configuration. The error presented itself as

error[E0523]: found two different crates with name X that are not distinguished by differing -C metadata. This will result in symbol conflicts between the two.

@scentini scentini marked this pull request as ready for review March 21, 2022 10:48
@scentini scentini requested a review from hlopko March 21, 2022 10:48
@scentini scentini merged commit c078494 into bazelbuild:main Mar 21, 2022
@UebelAndre
Copy link
Collaborator

Whenever either one of you have time, would one of you be able to add some details about the change here? I'm most curious to know if you ran into an issue and if there's a callstack that could be posted here so curious users can find something was fixed.

@scentini scentini deleted the proc_macro_leak_deps branch March 24, 2022 12:38
@scentini
Copy link
Collaborator Author

Hey @UebelAndre, I updated the description, PTAL.

@UebelAndre
Copy link
Collaborator

Hey @UebelAndre, I updated the description, PTAL.

Thank you!

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.

3 participants