protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

Location of proto files in protobuf-kotlin JAR changed to src directory in version 3.25

Open wfhartford opened this issue 1 year ago • 6 comments

What version of protobuf and what language are you using? 3.25.x Version: 3.25.x Language: Java & Kotlin

What runtime / compiler are you using (e.g., python version or gcc version) gcc version

What did you expect to see Location of proto files in protobuf-kotlin JARs should be consistent across versions, and with the protobuf-java JARs.

What did you see instead? protobuf-kotlin JARs in versions 3.25 and later nested the proto files under a new src directory. This directory was not present in previous versions, or in any recent or current version of the protobuf-java JARs.

Anything else we should know about your project / environment This change in JAR layout caused a build failure in my gradle project when protobuf was updated to 3.25.1. The build error was caused by declarations of the Any type at two different paths. I fixed the build by ensuring that these JARs are not included in the code generation phase, this complicated the build files, but probably produced a more better build.

wfhartford avatar Jan 11 '24 18:01 wfhartford

This appears to be a release-only issue where before 25.x we weren't packaging the WKT protos at all. As of 25.x, we package them similarly to java, but didn't strip the src prefix

mkruskal-google avatar Jan 16 '24 18:01 mkruskal-google

@zhangskz I know you've done some recent work here, I'm not really sure how our Maven configs are setup across build/release

mkruskal-google avatar Jan 16 '24 19:01 mkruskal-google

Just an additional note here. protobuf-kotlin expresses a dependency on protobuf-java, which already packages the well-know proto files.

I'm not sure what the intent is w.r.t. packaging proto + generated code, but there's some potential conflict with the files coming from multiple locations... particularly with respect to compatibility with the various protobuf gradle/maven plugins.

Is it kosher to simply delegate to the expressed protobuf-java dependency as the source of the proto files?

berksean avatar Feb 20 '24 21:02 berksean

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

github-actions[bot] avatar May 21 '24 10:05 github-actions[bot]

@mkruskal-google / @zhangskz - Sounds like someone was going to follow up on this?

berksean avatar May 22 '24 00:05 berksean