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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions rust/rust_common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@

"""Module with Rust definitions required to write custom Rust rules."""

CrateInfo = provider(
doc = "A provider containing general Crate information.",
fields = {
"aliases": "Dict[Label, String]: Renamed and aliased crates",
"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": "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": "List[File]: All source Files that are part of the crate.",
"type": "str: The type of this crate. eg. lib or bin",
},
)
load("//rust/private:providers.bzl", _CrateInfo = "CrateInfo")

CrateInfo = _CrateInfo