Skip to content

Commit

Permalink
prost: Add a few more output groups (#3081)
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion authored Dec 11, 2024
1 parent ac7e98e commit 5c795e5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion extensions/prost/private/prost.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ def _rust_prost_aspect_impl(target, ctx):
package_info = package_info_file,
),
rust_analyzer_info,
OutputGroupInfo(rust_generated_srcs = [lib_rs]),
OutputGroupInfo(
rust_generated_srcs = [lib_rs],
proto_descriptor_set = [proto_info.direct_descriptor_set],
),
]

rust_prost_aspect = aspect(
Expand Down Expand Up @@ -320,6 +323,8 @@ def _rust_prost_library_impl(ctx):
proto_dep = ctx.attr.proto
rust_proto_info = proto_dep[ProstProtoInfo]
dep_variant_info = rust_proto_info.dep_variant_info
rust_generated_srcs = proto_dep[OutputGroupInfo].rust_generated_srcs
proto_descriptor_set = proto_dep[OutputGroupInfo].proto_descriptor_set

prost_toolchain = ctx.toolchains[TOOLCHAIN_TYPE]

Expand All @@ -335,6 +340,10 @@ def _rust_prost_library_impl(ctx):
transitive = transitive,
),
),
OutputGroupInfo(
rust_generated_srcs = rust_generated_srcs,
proto_descriptor_set = proto_descriptor_set,
),
RustAnalyzerGroupInfo(
crate_specs = proto_dep[RustAnalyzerInfo].crate_specs,
deps = proto_dep[RustAnalyzerInfo].deps,
Expand Down

0 comments on commit 5c795e5

Please sign in to comment.