commit | 9803d3034c1f614d0bb5674ce0037266c25187b1 | [log] [tgz] |
---|---|---|
author | Paul Fariello <paul@fariello.eu> | Fri Jan 06 14:02:14 2023 +0100 |
committer | GitHub <noreply@github.com> | Fri Jan 06 13:02:14 2023 +0000 |
tree | 3f62e91bb05839b244ca8fbfbf4632840dbf7d47 | |
parent | 927a364cbcb696c897961794199f5c470f8047d0 [diff] |
Fix data and compile_data for rust_doc (#1741) Fixes #1572 Main issue is that data_paths do not inherit from original crate when building rust_doc (and probably rust_test). The main idea is to rely on crate_info which inherit correctly from original crate. Issue with this draft is that compile_data is filed with File instead of Target when building 3rd party crate. ``` ERROR: <redacted>__base64-0.13.1/BUILD.bazel:34:13: in rust_library rule @<redacted>__base64-0.13.1//:base64: Traceback (most recent call last): File "external/rules_rust/rust/private/rust.bzl", line 197, column 32, in _rust_library_impl return _rust_library_common(ctx, "rlib") File "external/rules_rust/rust/private/rust.bzl", line 292, column 32, in _rust_library_common return rustc_compile_action( File "external/rules_rust/rust/private/rustc.bzl", line 1093, column 46, in rustc_compile_action args, env_from_args = construct_arguments( File "external/rules_rust/rust/private/rustc.bzl", line 915, column 38, in construct_arguments expand_list_element_locations( File "external/rules_rust/rust/private/utils.bzl", line 311, column 53, in expand_list_element_locations return [_expand_location_for_build_script_runner(ctx, arg, data) for arg in args] File "external/rules_rust/rust/private/utils.bzl", line 255, column 30, in _expand_location_for_build_script_runner dedup_expand_location(ctx, env, data), File "external/rules_rust/rust/private/utils.bzl", line 230, column 31, in dedup_expand_location return ctx.expand_location(input, _deduplicate(targets)) Error in expand_location: at index 0 of targets, got element of type File, want Target ```
This repository provides rules for building Rust projects with Bazel.
General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust
.
Please refer to the full documentation.