Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Carlos Sanchez
    @carlosesh
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.0</version>
        <configuration>
            <parallel>methods</parallel>
            <useUnlimitedThreads>true</useUnlimitedThreads>
        </configuration>
    </plugin>
    Ittai Zeidman
    @ittaiz
    Right now we don’t support that. Not sure we should support it because I think it’s against the bazel idioms but I need to think about it some more.
    In bazel the parallelism unit is targets.
    In any case you’re welcome to open an issue to suggest more fine grain parallelism and we can discuss it further
    Carlos Sanchez
    @carlosesh
    For sure, I'd be glad to open an issue related to this topic. Now, another question, is there a way to change the parallelism to work on methods? Maybe my question doesn't make sense, I apologize in advance haha
    Ittai Zeidman
    @ittaiz
    This is exactly what I referred to in my previous message
    We don’t support that == we don’t support method parallelism
    Carlos Sanchez
    @carlosesh
    ah, makes sense, well, this was fruitful, thanks for sharing your knowledge on the topic @ittaiz
    P. Oscar Boykin
    @johnynek
    to be clear: bazel runs separate test targets in parallel already
    that is where the parallelism is "supposed" to come from.
    Ittai Zeidman
    @ittaiz
    Happy to.
    To be clear- if you want to parallel inside test targets we can brainstorm it. Need to understand the implications. But I agree with Oscar- aim for fine grain targets or you’ll have many problems with bazel
    For context Oscar is the previous maintainer of rules scala and I am the current maintainer of it
    Carlos Sanchez
    @carlosesh
    Ok, I will create the issue still, but for now I will create separate targets which will achieve parallelism, in order to do this I will refactor some classes and be more specific about the features to be tested in each target
    Ittai Zeidman
    @ittaiz
    Indeed
    Btw. Don’t know the stage you’re in but if you’re in an initial I recommend you take a look at exodus which is a project aimed at migrating maven projects to fine grain bazel targets. We (Wix) used it to migrate ~10MLOC
    Carlos Sanchez
    @carlosesh

    @ittaiz @johnynek I have one more question, in order for the targets to be executed in parallel, do I need to have a main build file which calls them?

    filegroup(
      name = "build_all",
      srcs = [
        "//services/service1:build",
        "//services/service2:build",
        "//services/service3:build",
      ]
    )

    Will doing it like this make the execution sequential instead of parallel?

    Again, perhaps you already answered this (most likely you have in previous answers), I just want to get familiar with this, sorry for all this questions

    Btw. Don’t know the stage you’re in but if you’re in an initial I recommend you take a look at exodus which is a project aimed at migrating maven projects to fine grain bazel targets. We (Wix) used it to migrate ~10MLOC

    Amazing! Well, most of the things have been migrated, however, there are still some that haven't been, so this will come handy, I started looking into it yesterday :)

    P. Oscar Boykin
    @johnynek
    no, you don't want to do that... you want to look at bazel test suites
    each test target should be a scala_test... those are atomic.... those will be run by a single process by bazel.
    you control your test parallelism by splitting those targets.
    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
    @nettijoe96
    Hi, can someone help me using scala_import?
    P. Oscar Boykin
    @johnynek
    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
    @nettijoe96
    sounds good. I'm going to get a more specific question and get back to you
    Joe Netti
    @nettijoe96
    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
    @nettijoe96
    Screen Shot 2020-12-22 at 5.05.13 PM.png
    (this doesn't work) ^^
    Peter Hrvola
    @hrvolapeter

    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
    @hrvolapeter

    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

    Sebastian Voss
    @sebastianvoss
    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
    @krisnaru
    how do query/list installed maven dependencies?
    latyas
    @ly0

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

    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
    @dlaflamme
    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
    @dlaflamme
    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.
    Rohit Ramprasad
    @rrampr
    Hello!
    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
    @Fristi

    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
    @Fristi
    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
    @rfan-debug
    @rrampr we are also facing the same problem. Have you found any viable way to enable javaConversions=True with bazel?
    Paulo Coutinho
    @paulo-coutinho

    Hi,

    The generated jar/binary always return null on version:

    Main.getClass.getPackage.getImplementationVersion

    There is any way to add version to the package?

    Thanks.

    Paulo Coutinho
    @paulo-coutinho
    hi, please anyone can support this: bazelbuild/rules_scala#166 ?