Skip to content

Commit

Permalink
Minor cleanup of prost rules (#2397)
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre authored Jan 8, 2024
1 parent 44a0161 commit a1e9f96
Showing 1 changed file with 4 additions and 31 deletions.
35 changes: 4 additions & 31 deletions proto/prost/private/prost.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ load("@rules_proto//proto:defs.bzl", "ProtoInfo", "proto_common")
load("//proto/prost:providers.bzl", "ProstProtoInfo")
load("//rust:defs.bzl", "rust_common")

# buildifier: disable=bzl-visibility
load("//rust/private:rust.bzl", "RUSTC_ATTRS")

# buildifier: disable=bzl-visibility
load("//rust/private:rustc.bzl", "rustc_compile_action")

Expand Down Expand Up @@ -254,53 +257,23 @@ rust_prost_aspect = aspect(
implementation = _rust_prost_aspect_impl,
attr_aspects = ["deps"],
attrs = {
"_cc_toolchain": attr.label(
doc = (
"In order to use find_cc_toolchain, your rule has to depend " +
"on C++ toolchain. See `@rules_cc//cc:find_cc_toolchain.bzl` " +
"docs for details."
),
default = Label("@bazel_tools//tools/cpp:current_cc_toolchain"),
),
"_collect_cc_coverage": attr.label(
default = Label("//util:collect_coverage"),
executable = True,
cfg = "exec",
),
"_error_format": attr.label(
default = Label("//:error_format"),
),
"_extra_exec_rustc_flag": attr.label(
default = Label("//:extra_exec_rustc_flag"),
),
"_extra_exec_rustc_flags": attr.label(
default = Label("//:extra_exec_rustc_flags"),
),
"_extra_rustc_flag": attr.label(
default = Label("//:extra_rustc_flag"),
),
"_extra_rustc_flags": attr.label(
default = Label("//:extra_rustc_flags"),
),
"_grep_includes": attr.label(
allow_single_file = True,
default = Label("@bazel_tools//tools/cpp:grep-includes"),
cfg = "exec",
),
"_process_wrapper": attr.label(
doc = "A process wrapper for running rustc on all platforms.",
default = Label("//util/process_wrapper"),
executable = True,
allow_single_file = True,
cfg = "exec",
),
"_prost_process_wrapper": attr.label(
doc = "The wrapper script for the Prost protoc plugin.",
cfg = "exec",
executable = True,
default = Label("//proto/prost/private:protoc_wrapper"),
),
},
} | RUSTC_ATTRS,
fragments = ["cpp"],
host_fragments = ["cpp"],
toolchains = [
Expand Down

0 comments on commit a1e9f96

Please sign in to comment.