Comments (14)
I use scalapb 0.4.14 and "com.github.os72" % "protoc-jar" % "2.x.5" using "-v261". It seems to work without problems having
syntax = "proto2";
import "scalapb/scalapb.proto";
...
at the beginning of my proto files.
from scalapb.
@crispywalrus Thanks for reporting. Are you on protoc 2.6.1 or an earlier version?
We can solve it by providing a second copy of scalapb.proto without that line so it can work with older protoc's. In the mean time you can work around it by modifying your own copy of scalapb.proto.
from scalapb.
Closing due to inactivity. I believe this should work on >=2.6.1
from scalapb.
@thesamet I am using protoc 2.6.1 and getting an error
Import "scalapb/scalapb.proto" was not found or had errors.
I suppose it's related to this issue.
from scalapb.
nvm, I didn't add scalapb-runtime
from scalapb.
@prettynatty how did you add scalapb-runtime
?
from scalapb.
@niiamon See "Adding scalapb.proto to your project" at http://trueaccord.github.io/ScalaPB/customizations.html
from scalapb.
@thesamet thanks but I already have that in the project but it's still not working.
@prettynatty I'm actually using your actor-server but I am simply unable to get it to compile due to the protobufs error.
These are some of the issues that complain when I attempt a build:
Error: Import "scalapb/scalapb.proto" was not found or had errors.
Error: Import "sequence.proto" was not found or had errors.
Any ideas how I can get over this?
from scalapb.
@niiamon Will you be able to reproduce this issue on a minimal project and post it on github so we can help debug?
from scalapb.
@thesamet on it. I will revert here as soon as I have something.
from scalapb.
@thesamet Please see this: https://github.com/niiamon/scalapb-test. I have Scala PB added to the project and I have a small proto file in there.
I am still relatively new to Scala and Protocol Buffers as well so any comments are welcome.
from scalapb.
@niiamon , your build.sbt was adding sbt-scalapb
instead of scalapb-runtime
to the library dependencies. Another unrelated issue that prevented it from compiling was a reference to a configuration named testerpackage
, I renamed it to test
so the example can fully run.
So the full libraryDependencies in your case should be:
libraryDependencies ++= {
val akkaV = "2.3.12"
val akkaStreamV = "1.0"
val scalaTestV = "2.2.5"
Seq(
"com.typesafe.akka" %% "akka-actor" % akkaV,
"com.typesafe.akka" %% "akka-stream-experimental" % akkaStreamV,
"com.typesafe.akka" %% "akka-http-core-experimental" % akkaStreamV,
"com.typesafe.akka" %% "akka-http-experimental" % akkaStreamV,
"com.typesafe.akka" %% "akka-http-spray-json-experimental" % akkaStreamV,
"com.typesafe.akka" %% "akka-http-testkit-experimental" % akkaStreamV,
"org.scalatest" %% "scalatest" % scalaTestV % "test",
"com.trueaccord.scalapb" %% "scalapb-runtime" % "0.5.9" % PB.protobufConfig
)
}
from scalapb.
@thesamet so I've made those changes here as well. No such luck. I still get the same import was not found problem.
from scalapb.
Works completely fine here when I start sbt and type compile
. Have you reloaded sbt after making the change (type 'reload' in an existing sbt session, or just exit sbt and start it again)? If the problem persists after an sbt restart, let's continue debugging it at Stackoverflow (please @thesamet there)
from scalapb.
Related Issues (20)
- Support more than 254 fields HOT 1
- Cyclic Error when compiling protobuf-java 3.24.0 on Scala 3.3.0
- Add option to generate only gRPC service and method descriptors. HOT 1
- Custom target directory breaks incremental compilation HOT 2
- ScalaPB 0.11.13 missing release note HOT 3
- problem with `-Xsource:3` and Scala 2.13.12 HOT 2
- Dockerized Native Image build failing HOT 4
- Unify ObjectLens and MessageLens in next release
- Different behavior from Google protoc generated message for accessing proto extensions HOT 15
- Help making pull request: Ability to add `derives` clause HOT 6
- Scalapb.proto would result in a name clash for clearExtension method in OneofOptionsBuilder HOT 8
- allow_alias equality semantics differ between generated Scala and Java code HOT 1
- 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
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.