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

Added rust_common.create_crate_info #818

Merged
merged 3 commits into from
Jul 1, 2021
Merged

Conversation

UebelAndre
Copy link
Collaborator

The rust_common.create_crate_info macro creates a CrateInfo provider through a macro which allows for the rules to maintain better backwards compatibility when making changes to CrateInfo.

rust_common = struct(
create_crate_info = _create_crate_info,
Copy link
Member

Choose a reason for hiding this comment

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

I know it's not exported to https://bazelbuild.github.io/rules_rust/, but could you also add a doc saying that create_crate_info should be used for construction, and crate_info for accessing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Like, a docstring? (like the one I added?)

Copy link
Member

Choose a reason for hiding this comment

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

Oh right, yeah that works. Nit: rename "macro" to "function" in the docstring

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is the terminology not "macro"? But updated.

@UebelAndre UebelAndre merged commit f4cbea5 into bazelbuild:main Jul 1, 2021
@UebelAndre UebelAndre deleted the create branch July 1, 2021 08:33
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.

None yet

2 participants