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

Deduplicate the CrateInfo provider #720

Merged
merged 2 commits into from
May 6, 2021

Conversation

UebelAndre
Copy link
Collaborator

It seems there should be a single source of truth here? The only difference seems to be in the docs for the parameters:

diff --git a/rust/private/providers.bzl b/rust/private/providers.bzl
index 53bfbc8..549e371 100644
--- a/rust/private/providers.bzl
+++ b/rust/private/providers.bzl
@@ -18,15 +18,15 @@ CrateInfo = provider(
     doc = "A provider containing general Crate information.",
     fields = {
         "aliases": "Dict[Label, String]: Renamed and aliased crates",
-        "deps": "depset[Provider]: This crate's (rust or cc) dependencies' providers.",
+        "deps": "List[Provider]: This crate's (rust or cc) dependencies' providers.",
         "edition": "str: The edition of this crate.",
         "is_test": "bool: If the crate is being compiled in a test context",
         "name": "str: The name of this crate.",
         "output": "File: The output File that will be produced, depends on crate type.",
-        "proc_macro_deps": "depset[CrateInfo]: This crate's rust proc_macro dependencies' providers.",
+        "proc_macro_deps": "List[CrateInfo]: This crate's rust proc_macro dependencies' providers.",
         "root": "File: The source File entrypoint to this crate, eg. lib.rs",
         "rustc_env": "Dict[String, String]: Additional `\"key\": \"value\"` environment variables to set for rustc.",
-        "srcs": "depset[File]: All source Files that are part of the crate.",
+        "srcs": "List[File]: All source Files that are part of the crate.",
         "type": "str: The type of this crate. eg. lib or bin",
     },
 )

Any reason to not unify these? Note that users will still be able to load the provider from the same path.

@UebelAndre UebelAndre requested a review from hlopko May 5, 2021 19:28
@google-cla google-cla bot added the cla: yes label May 5, 2021
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.

Oh good catch, I think this was added by accident. LGTM!

@UebelAndre UebelAndre merged commit 73335ee into bazelbuild:main May 6, 2021
@UebelAndre UebelAndre deleted the crate-info branch May 6, 2021 14:15
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