Protocol buffer compiler for Scala. Consider sponsoring ScalaPB: https://github.com/sponsors/thesamet
mergify[bot] on master
Update sbt-mdoc to 2.3.7 (#1479… (compare)
mergify[bot] on master
Update nscplugin, sbt-scala-nat… (compare)
mergify[bot] on master
Update mockito-core to 5.1.0 (#… (compare)
v0.10.5
release soon? Do I need to perform any action?
Hi there, just recently attempted to update one of my projects from sbt 1.4.9 to 1.5.5 and am now unable to resolve the binary protoc-gen-validate
dependencies:
[error] (client / update) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo1.maven.org/maven2/io/envoyproxy/protoc-gen-validate/protoc-gen-validate/0.6.2/protoc-gen-validate-0.6.2-osx-x86_64.protoc-plugin: not found: https://repo1.maven.org/maven2/io/envoyproxy/protoc-gen-validate/protoc-gen-validate/0.6.2/protoc-gen-validate-0.6.2-osx-x86_64.protoc-plugin
it seems to be appending the wrong extension (.protoc-plugin
vs .exe
), the same dependency resolved via sbt 1.4.9:
sbt:project> show client/protobuf:managedClasspath
...
[info] * Attributed(/Users/dk/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/envoyproxy/protoc-gen-validate/protoc-gen-validate/0.6.2/protoc-gen-validate-0.6.2-osx-x86_64.exe)
Curious if anyone can explain the different extension? or suggest a workaround/fix
.dependsOn()
. I've put together this minimal example that reproduces the issue: https://github.com/dkichler/protoc-plugin-resolution-issuejava_outer_classname
, java_package
, etc. Are those even necessary?
message Location {
option (scalapb.message).no_box = true;
string city = 1 [(scalapb.field).no_box = true];
...
}
Hello, another question. I've got a proto file that I'd like to generate as both scala and java. The file imports another proto file (sourced though sbt). I'm running into issues during the generation because the imported file doesn't have any of the java conversion options.
Is there a way to add / decorate the java conversion options? I don't have direct access to the file, only the ability to import it.
Here's the file i'm trying to pull in for reference
syntax = "proto3";
import "scalapb/scalapb.proto";
option (scalapb.options) = {
single_file: true
lenses: true
retain_source_code_info: true
flat_package: true
no_default_values_in_constructor: true,
package_name: "foo"
};
message PackageUid {
option (scalapb.message).extends = "bar";
option (scalapb.message).companion_extends = "baz";
string uid = 1;
}
java_conversions: true
sparksql-scalapb-test
project to reproduce the issue. Here's the draft PR: thesamet/sparksql-scalapb-test#5
def fromRawEventDS[A <: GeneratedMessage : GeneratedMessageCompanion : Encoder](
ds: Dataset[RawEvent]
) = ...
Hi everyone,
I am new to ScalaPB and started by using the tutorial by downloading the project from github: https://scalapb.github.io/docs/getting-started.
I managed to generate the codes after sbt compile in:
target/scala-2.13/src_managed/main/scalapb/com/example/tutorial/addressbook
My main question is how to use the generated codes (case classes for each message) obtained after compiling since they are in ..\target\scala-2.13\src_managed\main\scalapb\tutorial\addressbook\
Also, in the codes from github, there is no tutorial package in /scr/main/scala/: I tried to refactor and create a tutorial package as
\basic\src\main\scala\tutorial\AddressBookMain.scala but I got the same errors: Person and AddressBook are not found (cannot resolve symbol AddressBook and Person).
Coud someone help me with those please, I am really stuck with this (I use IntelliJ IDEA)
Thank you very much,
Best regards.
Maia
target/.../src_managed
is one of them. If you type in sbt sourceDirectories
it will print out this list.
Hi commnunity, I try to implement a server with ScalaPB by following this: https://medium.com/rahasak/reactive-microservices-with-grpc-and-scala-e4767ca2d34a. I got a red highligted error on build() , on server != null, and awaitTermination() is not recognized :val server = ServerBuilder
.forPort(9000)
.addService(ProtoReflectionService.newInstance())
.addService(DocumentServiceGrpc.bindService(new DocumentServiceImpl, ExecutionContext.global))
.build()
.start()
// block until shutdown
if (server != null) {
server.awaitTermination()
}
val server: Server = ...