Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    P. Oscar Boykin
    note: fine grain test targets also results in better test caching in your CI. If you have big mega targets in bazel, you don't get much mileage out of using bazel honesty
    Joe Netti
    Hi, can someone help me using scala_import?
    P. Oscar Boykin
    what is your question?
    PS: it is generally best to just ask because now I'm stepping away a bit and you will have to wait for another RTT for the next response
    Joe Netti
    sounds good. I'm going to get a more specific question and get back to you
    Joe Netti
    Hi, I'm trying to use play framework with bazel. However, scala_binary requires a main class and there is no main for play framework. I see this repo but I can't seem to duplicate it. What do I set main_class to?
    Joe Netti
    Screen Shot 2020-12-22 at 5.05.13 PM.png
    (this doesn't work) ^^
    Peter Hrvola

    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

    Peter Hrvola

    I've redefined in my workspace

        name = "scalapb_worker_deps_provider",
        deps_id = "scalapb_worker_deps",
        visibility = ["//visibility:public"],
        deps = [

    and included it in default_deps_toolchain, then everything worked

    Sebastian Voss
    Hi, I'm running into a java.lang.StackOverflowError on bazel build -s //.... I already tried to increase the stack size with bazel --host_jvm_args=-Xss32m build -s //... but it does not show any effect. Is this the right way to increase it?
    Krish Narukulla
    how do query/list installed maven dependencies?

    Hi, guys, greetings. I have trouble in generating dependencies by bazel-deps,
    here is my config in dependencies.yaml

          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 :-)

    And the X question is I want org.scalamacros.paradise in plugins when I define scala_library, and I need to add this into my dependencies.
    Daniel LaFlamme
    is there any way to override URLs specified here without changing the code? https://github.com/bazelbuild/rules_scala/blob/master/scala/scala_cross_version.bzl#L18
    meaning, override when using rules_scala in bazel WORKSPACE file
    Daniel LaFlamme
    for others, the answer appears to be "NO". Potential solutions are using the functionality here: bazelbuild/bazel#12170, or doing something similar with an HTTP/HTTPs proxy.
    We are using scalapb with bazel and not sbt. Is there a way to flip on javaConversions=true with bazel so I can get the nice sauce methods like toJavaProto and fromJavaProto. The scalapb docs only show how to enable this with sbt https://scalapb.github.io/docs/sbt-settings/
    Mark de Jong

    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.

    Mark de Jong
    I also came across greyhound which is a kafka zio client but depends on a fork of rules_scala. Did not try it yet, but I wonder what's the best way forward
    Ruixi Fan
    @rrampr we are also facing the same problem. Have you found any viable way to enable javaConversions=True with bazel?
    Paulo Coutinho


    The generated jar/binary always return null on version:


    There is any way to add version to the package?


    Paulo Coutinho
    hi, please anyone can support this: bazelbuild/rules_scala#166 ?
    Thomas Anagrius
    Is it possible to configure a custom scalac binary i rules_scala?
    Hey, what is the latest version of rules_scala? I can't import it into my bazel project, the copy-paste instruction looks outdated