-
Notifications
You must be signed in to change notification settings - Fork 205
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
ledger-api: Use proto_jars
, and publish Protobuf sources separately from the Scala classes. [KVL-714]
#8091
Conversation
CHANGELOG_BEGIN - [Ledger API] The Scala JARs containing the gRPC definitions no longer contain the *.proto files used to generate the ScalaPB-based classes. CHANGELOG_END
CHANGELOG_BEGIN - [Ledger API] The *.proto files containing the gRPC definitions are now provided by a new Maven Central artifact, with the group "com.daml" and the artifact name "ledger-api-proto". CHANGELOG_END
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a few comments, thanks!
visibility = ["//visibility:public"], | ||
) if is_windows == False else None | ||
|
||
if maven_group and maven_artifact_prefix: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we always generate this or does this fail if this is not set? The logic is complex enough so if we can make less things conditional, it seems a bit simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because the target doesn't have Maven coordinates.
@@ -45,7 +45,7 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar") | |||
], | |||
maven_artifact_prefix = "daml-lf-%s-archive" % version, | |||
maven_group = "com.daml", | |||
strip_import_prefix = "src/main/protobuf/", | |||
strip_import_prefix = "src/main/protobuf", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What changed to require this? Was it broken before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has exactly the same behavior, but this makes it more consistent with other usages of the same parameter.
The current behavior is to bundle the Protobuf definitions in both the generated Scala JAR and its source JAR. This makes it hard to pull these in and generate the Scala code yourself, because you have to get both the source and the generated code, which means generating your own will lead to classpath conflicts, with multiple versions of the same gRPC classes.
If you were generating Java (or Kotlin, or Clojure, or…) gPRC classes, this wouldn't be a problem, but you would have Scala classes on your classpath for no reason.
Changelog
Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tagsNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.