diff --git a/extensions/prost/private/prost.bzl b/extensions/prost/private/prost.bzl index c8d0953d2f..a51de00313 100644 --- a/extensions/prost/private/prost.bzl +++ b/extensions/prost/private/prost.bzl @@ -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( @@ -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] @@ -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,