Skip to content

Commit

Permalink
draft: fix data and compile_data for rust_doc
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jan 2, 2023
1 parent 532e60f commit d8571bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -905,8 +905,11 @@ def construct_arguments(
rustc_flags.add_all(rust_std_paths, before_each = "-L", format_each = "%s")
rustc_flags.add_all(rust_flags)

# Gather data path from crate_info since it is inherited from real crate for rust_doc and rust_test
data_paths = getattr(attr, "data", []) + getattr(crate_info.compile_data, []).to_list()

# Deduplicate data paths due to https://github.com/bazelbuild/bazel/issues/14681
data_paths = depset(direct = getattr(attr, "data", []) + getattr(attr, "compile_data", [])).to_list()
data_paths = depset(direct = data_paths).to_list()

rustc_flags.add_all(
expand_list_element_locations(
Expand Down

0 comments on commit d8571bb

Please sign in to comment.