Comments (8)
Can you provide step-by-step instructions on how to reproduce the problem you are seeing?
from scalapb.
I've setup a small sample project here: https://github.com/shikai93/scalapb-test
I hope thats helpful ~
It only contains the scalapb.proto and google well-known protos.
from scalapb.
Can you include the project
directory and build.sbt
files? Is it possible that you are trying to generate Scala or Java code for protos in protos/google/protobuf
which already have classes generated for?
from scalapb.
It looks like it is generating code for messages that are already included with protobuf-java here: https://github.com/shikai93/scalapb-test/blob/24c0e187c5d9aa9e1ea15eb78d792c85d7bab630/scala/project/Settings.scala#L18
They can be made available by adding:
libraryDependencies += "com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf"
from scalapb.
they are actually within the scala folder, let me pull them up one level.
you are right that i am trying to generate the messages already included. But i did not integrate in the relevant dependencies for common-proto
libraryDependencies ++= Seq( "com.thesamet.scalapb.common-protos" %% "proto-google-common-protos-scalapb_0.11" % "2.9.6-0" % "protobuf", "com.thesamet.scalapb.common-protos" %% "proto-google-common-protos-scalapb_0.11" % "2.9.6-0" )
so i was under the impression that this clash would not occur
from scalapb.
But i did not integrate in the relevant dependencies for common-proto
The one causing the problem are the one in google/protobuf
which are included in scalapb-runtime for Scala and protobuf-java for Java.
from scalapb.
I see, i think this was a change induced in 0.11.14?
But yes, changing them to includePath worked for my case, updated my test case repo, thanks for the help! I shall close this issue
from scalapb.
The error seems to appear in the Java generated code, maybe there's a bump in the protoc version somewhere in your toolchain that triggered it, but it's odd that this set up ever worked.
from scalapb.
Related Issues (20)
- JSON serialization of Any message fails when the message has a special JSON representation HOT 2
- scalapb grpc runtime & InProcessTransport HOT 4
- Unrecognized enum serialized as int HOT 2
- Cannot name a 'oneof' field 'option' if an optional field exists HOT 1
- --jvm_0_out: protoc-gen-jvm_0: Plugin failed with status code 1. WIth Java version 11, change to 17 is fixed HOT 21
- Type Mismatch Error with `asRecognized` in versions 0.11.14 and 0.11.15 HOT 3
- sealed_oneof_companion_extends doesn't work for optional sealed oneof
- Sealed oneof "extend" for Empty case HOT 1
- java.lang.IllegalAccessError: tried to access method 'com.google.protobuf.LazyStringArrayList' HOT 10
- google/protobuf/empty.proto: File not found. HOT 1
- Define trait for GeneratedEnumCompanion’s fromJavaValue/toJavaValue HOT 1
- Support Scala 3.4 type wildcards HOT 2
- `_typemapper` are defined as package private, causing issues when deriving schemas HOT 4
- Protobuf with a field named using generates invalid Scala 3 code HOT 1
- ArrayIndexOutOfBoundsException on getFieldByNumber HOT 5
- UTF-8 Strings are unparseable? HOT 2
- JsonFormat.toJsonString omits authorisation string in the output JSON HOT 2
- Dependency on `scalapb.options.ScalapbProto` in generated code. HOT 3
- New release HOT 1
- Add an option to generate oneof fields as a sealed abstract class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scalapb.