-
Notifications
You must be signed in to change notification settings - Fork 566
Description
First, this description is wrong:
rules_rust/rust/private/providers.bzl
Line 27 in f5b7135
| "data": "depset[File]: Compile data required by crates that use the current crate as a proc-macro.", |
The CrateInfo.data field is the data attribute of the target (rust_binary, rust_library).
With that clarification, is there a reason this depset doesn't include all transitive data? This becomes an issue in the following case:
rust_library(
name = "foo",
srcs = ["foo.rs"],
data = ["foo.txt"],
)
rust_library(
name = "bar",
srcs = ["bar.rs"],
deps = [":foo"],
)When operating on the CrateInfo.data provider from bar, it will not include foo.txt from the :foo dependency which seems unexpected. My initial thought was to collect all CrateInfo.data members into each crate such that :bar would now include that file. But if there is value for folks already having data be representative of just that target, then perhaps it'd be sensivle to have a CrateInfo.transitive_data?
For the record, it seems DefaultInfo.default_runfiles is constructed according to my expectations mentioned above.