Skip to content

Commit 0972574

Browse files
authored
Fix the patch_tool annotation. (#2404)
It was documented incorrectly as a list, but the parameter is actually an Option<String> in the rust code (https://github.com/bazelbuild/rules_rust/blob/a1e9f9600cd22ecfdd08fc4a7572ccbdeba97395/crate_universe/src/metadata/metadata_annotation.rs#L152)
1 parent a1e9f96 commit 0972574

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crate_universe/extension.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ _annotation = tag_class(
279279
default = "auto",
280280
),
281281
patch_args = attr.string_list(doc = "The `patch_args` attribute of a Bazel repository rule. See [http_archive.patch_args](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_args)"),
282-
patch_tool = attr.string_list(doc = "The `patch_tool` attribute of a Bazel repository rule. See [http_archive.patch_tool](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_tool)"),
282+
patch_tool = attr.string(doc = "The `patch_tool` attribute of a Bazel repository rule. See [http_archive.patch_tool](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_tool)"),
283283
patches = attr.label_list(doc = "The `patches` attribute of a Bazel repository rule. See [http_archive.patches](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patches)"),
284284
proc_macro_deps = _relative_label_list(doc = "A list of labels to add to a crate's `rust_library::proc_macro_deps` attribute."),
285285
rustc_env = attr.string_dict(doc = "Additional variables to set on a crate's `rust_library::rustc_env` attribute."),

crate_universe/private/crate.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def _annotation(
154154
`cargo_build_script` targets for the current crate.
155155
patch_args (list, optional): The `patch_args` attribute of a Bazel repository rule. See
156156
[http_archive.patch_args](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_args)
157-
patch_tool (list, optional): The `patch_tool` attribute of a Bazel repository rule. See
157+
patch_tool (string, optional): The `patch_tool` attribute of a Bazel repository rule. See
158158
[http_archive.patch_tool](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_tool)
159159
patches (list, optional): The `patches` attribute of a Bazel repository rule. See
160160
[http_archive.patches](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patches)

0 commit comments

Comments
 (0)