You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use the kotlin_package_mapping feature with a top-level wildcard (to move all of the proto packages underneath my own top-level package), like this:
kotlin_package_mapping="*->com.exampleapp.api.*"
The generated code will convert well-known-types incorrectly. That is, it converts google.protobuf.Timestamp to com.exampleapp.api.pbandk.wkt.Timestamp. The results in a compiler error; the pbandk.wkt.Timestamp is provided by the PBandK library itself and not available at the mapped package.
The workaround is to preserve the well-known-type package mapping, like this:
At first I thought this was a bug, but considering I did ask every package to be rewritten to a new top-level package, maybe it's working as designed? I figured I'd log it just in case.
The text was updated successfully, but these errors were encountered:
If I use the
kotlin_package_mapping
feature with a top-level wildcard (to move all of the proto packages underneath my own top-level package), like this:kotlin_package_mapping="*->com.exampleapp.api.*"
The generated code will convert well-known-types incorrectly. That is, it converts
google.protobuf.Timestamp
tocom.exampleapp.api.pbandk.wkt.Timestamp
. The results in a compiler error; thepbandk.wkt.Timestamp
is provided by the PBandK library itself and not available at the mapped package.The workaround is to preserve the well-known-type package mapping, like this:
kotlin_package_mapping="google.protobuf->pbandk.wkt;*->com.exampleapp.api.*"
At first I thought this was a bug, but considering I did ask every package to be rewritten to a new top-level package, maybe it's working as designed? I figured I'd log it just in case.
The text was updated successfully, but these errors were encountered: