Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtain the "CARGO_CRATE_NAME" value from the CrateInfo #999

Merged
merged 7 commits into from
Oct 29, 2021

Conversation

scentini
Copy link
Collaborator

@scentini scentini commented Oct 28, 2021

At this point we have a CrateInfo for the target which contains the name of the crate, regardless whether it's been derived from the ctx.attr.crate_name or explicitly assigned. The code without this PR works well for the rules_rust, because the CrateInfo.crate_name is obtained by calling the get_crate_name_from_attr function. However, this is not sufficient for aspects, as they may be attached to a target that doesn't specify crate name, or one may want to assign a modified name to crates created by aspects.

@google-cla google-cla bot added the cla: yes label Oct 28, 2021
@scentini scentini requested a review from hlopko October 28, 2021 13:42
@scentini scentini marked this pull request as ready for review October 28, 2021 13:43
Copy link
Member

@hlopko hlopko left a comment

Choose a reason for hiding this comment

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

LGTM, one nit.

@scentini scentini merged commit b25b508 into bazelbuild:main Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants