Skip to content

Fix scala_proto_library default outputs #1701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

simuons
Copy link
Collaborator

@simuons simuons commented Feb 18, 2025

Description

scala_proto_library returns too many outputs via DefaultInfo files

It returns all transitive jars used for compilation while it should return
pair of srcjar and compile jar for each direct proto_library dependency

Test standalone_scala_proto_outs_test failure before change:

In test _default_outputs_test from //test/proto:default_outputs_test.bzl: 
Expected "["standalone_proto_scalapb-src.jar", "standalone_proto_scalapb.jar"]", but got 
"["disruptor-3.4.2.jar", "fastparse_2.12-2.1.3.jar", "grpc-api-1.70.0.jar", "grpc-context-1.70.0.jar", "grpc-core-1.70.0.jar", "grpc-netty-1.70.0.jar", "grpc-protobuf-1.70.0.jar", "grpc-stub-1.70.0.jar", "guava-33.4.0-jre.jar", "instrumentation-api-0.3.0.jar", "lenses_2.12-0.11.17.jar", "libcore.jar", "liblite_runtime_only.jar", "netty-buffer-4.1.110.Final.jar", "netty-codec-4.1.110.Final.jar", "netty-codec-http-4.1.110.Final.jar", "netty-codec-http2-4.1.110.Final.jar", "netty-codec-socks-4.1.110.Final.jar", "netty-common-4.1.110.Final.jar", "netty-handler-4.1.110.Final.jar", "netty-handler-proxy-4.1.110.Final.jar", "netty-resolver-4.1.110.Final.jar", "netty-transport-4.1.110.Final.jar", "opencensus-api-0.22.1.jar", "opencensus-contrib-grpc-metrics-0.22.1.jar", "opencensus-impl-0.22.1.jar", "opencensus-impl-core-0.22.1.jar", "perfmark-api-0.27.0.jar", "scala-library-2.12.20.jar", "scala-reflect-2.12.20.jar", "scalapb-runtime-grpc_2.12-0.11.17.jar", "scalapb-runtime_2.12-0.11.17.jar", "standalone_proto_scalapb-src.jar", "standalone_proto_scalapb.jar"]"

Motivation

When downloading target outputs via result-store we get unrelated jars.

scala_proto_library returns too many outputs via DefaultInfo files

It returns all  transitive jar used for compilation while it should return
pair of srcjar and compile jar for each direct proto_library dependency
@simuons simuons requested a review from liucijus as a code owner February 18, 2025 10:30
@simuons simuons merged commit 04bbcc1 into bazel-contrib:master Feb 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant