Hello, I'm getting a bit weird error when defining custom dependencies with scala_proto. I've followed the docs at https://github.com/bazelbuild/rules_scala/blob/master/docs/scala_proto_library.md I've added the scalapb_toolchain
and default_deps_toolchain
but I'm getting error
File "/private/var/tmp/_bazel_hrvolap/cbad7e6dac15bf07632f0b5b890ca227/external/io_bazel_rules_scala/scala/private/toolchain_deps/toolchain_deps.bzl", line 13, column 9, in _lookup_provider_by_id
fail(_required_deps_id_message(ctx.attr.name, toolchain_type_label, deps_id))
Error in fail: scalapb_worker_deps requires mapping of scalapb_worker_deps provider id on the toolchain @io_bazel_rules_scala//scala_proto:deps_toolchain_type
which seems like needs to be added to toolchain, but when I added it as a dep_provider to the default_deps_toolchain
I get dependency cycle.
Also the whole story why I want custom dependencies because grpc client dependency is overlapping with dependencies for bigtable and version are not compatible
SOLVED
I've redefined in my workspace
declare_deps_provider(
name = "scalapb_worker_deps_provider",
deps_id = "scalapb_worker_deps",
visibility = ["//visibility:public"],
deps = [
"@com_google_protobuf//:protobuf_java",
"//third_party/jvm/com/thesamet/scalapb:protoc_bridge",
"//third_party/jvm/com/thesamet/scalapb:compilerplugin",
],
)
and included it in default_deps_toolchain, then everything worked
Hi, guys, greetings. I have trouble in generating dependencies by bazel-deps
,
here is my config in dependencies.yaml
org.scalamacros:
paradise:
lang: scala
version: "2.1.0"
it gave me
[ForkJoinPool-1-worker-15] ERROR bazel_deps.CoursierResolver - not found: https://repo.maven.apache.org/maven2/org/scalamacros/paradise_2.12/2.1.0/paradise_2.12-2.1.0.pom
but actually I want https://repo.maven.apache.org/maven2/org/scalamacros/paradise_2.12.0/2.1.0/paradise_2.12.0-2.1.0.pom
is it anything wrong in my dependencies.yaml? Thank you guys so much :-)
org.scalamacros.paradise
in plugins
when I define scala_library
, and I need to add this into my dependencies.
toJavaProto
and fromJavaProto
. The scalapb docs only show how to enable this with sbt https://scalapb.github.io/docs/sbt-settings/
Hi there!
What is the recommend way of working with scala and bazel? I've tried a setup with bazelbuild/rules_scala and rules_jvm_external. With that I get compile errors saying there are missing classes on the classpath. Like described here: bazelbuild/rules_jvm_external#578
I was expecting the rules_jvm_external would resolve the transitive dependencies, but this seems not the case.