Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

I am working with junit tests and I have a timeout on them (300s). But when the test timeout I get the information on class level. But I want information on individual test method on how much time it ...
Binary_Beast's user avatar
0 votes
0 answers
19 views

my .bazelversion is 8.3.1 Given this kind of a build file: load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library", "kt_jvm_binary") kt_jvm_binary( name = "...
Ian CTO's user avatar
2 votes
0 answers
98 views

I have been trying to follow tutorials online for how to add the Java JNI header to a cc_library but I keep getting an error of no such package '@@[unknown repo 'local_jdk' requested from @@]//': The ...
rkesters's user avatar
  • 128
0 votes
0 answers
76 views

Facing below issue on bazel build on M1 Pro (MacOS - 13.6.5) bazel build :all --config=mac64 WARNING: Option '...
rishi007bansod's user avatar
0 votes
1 answer
86 views

I have the following structure: BUILD.bazel MODULE.bazel com/test/TestMain.java com/test/assets/ BUILD.bazel load("@rules_java//java:defs.bzl", "java_binary") package(...
Gunslinger's user avatar
  • 1,531
0 votes
1 answer
197 views

I would like to specify input files to bazel with names like ContextFinder$5.class. Consider the following bazel BUILD file: package(<redacted>) filegroup( name = "class_overrides"...
merlin2011's user avatar
  • 76.5k
0 votes
1 answer
129 views

➜ simpleproject git:(main) ✗ bazel run @maven//:pin --verbose_failures ERROR: /private/var/tmp/_bazel_pk/2535445c9817f31453336c07943a57d6/external/rules_jvm_external~/private/extensions/maven.bzl:450:...
Prasanth Kommini's user avatar
0 votes
1 answer
203 views

I have a genrule which takes in a java binary as a src and uses $(location ) as the cmd. When the genrule is executed, I get Cannot locate runfiles directory. (Set $JAVA_RUNFILES to inhibit searching.)...
Coder123's user avatar
0 votes
1 answer
189 views

I think a build error is being caused by dependency conflict. I've found the older version of a library using bazel query. These 2.14.0 versions of jackson are conflicting with new versions. I'll try ...
gph's user avatar
  • 1,361
0 votes
1 answer
109 views

I have several dependencies that pull in grpc and the circular dependency errors in Bazel are making it impossible to make progress at a reasonable pace. Most recently I started getting this error: ...
gph's user avatar
  • 1,361
0 votes
1 answer
225 views

I have seen a few questions about data dependencies in bazel but nothing I have tried seems to work. My project has this structure: |-- BUILD.bazel |-- resources | |-- gold | `-- inputs | `--...
melston's user avatar
  • 2,374
1 vote
0 answers
306 views

I'm trying to use custom zulu jdk java toolchain with bazel but haven't been successful. I must admit I'm not very familiar with Java and hence not really sure what's missing. Here's the ...
Prasad's user avatar
  • 196
2 votes
0 answers
211 views

When debugging our Kotlin code while running a test, hitting a breakpoint shows some values get optimized out if they are not called further down in the scope. While ideal for complied code, this is a ...
kmfsousa's user avatar
  • 233
0 votes
1 answer
223 views

I’m using Bazel to build JanusGraph. For Janusgraph to find all the config files it needs to have them on the classpath. It finds the files via File class but that can’t read from a jar. Basel docs ...
gph's user avatar
  • 1,361
0 votes
0 answers
37 views

I'm having problems with the java_test rule. Given a very simple scenario of a class called Code, and a test case called Test, after running the test and either failing or succeeding, if I change the ...
Jason's user avatar
  • 1
0 votes
0 answers
167 views

I am developing an intellij plugin, and I use bazel to build my project. When I run the build, I see a lot of errors related to class in intellij SDK. Such as: error: unresolved reference: VirtualFile ...
guy mograbi's user avatar
  • 28.9k
0 votes
1 answer
416 views

How can one query Bazel to obtain the absolute path to the JDK which its Java Rules use? I'm aware that there can be several, and would like to obtain "the one it uses to run tests under". ...
vorburger's user avatar
  • 4,078
1 vote
0 answers
338 views

I'm using Bazel to build my project, and I notice that on some incremental builds I see the following error: Analyzing: target <target I'm building> INFO: Repository remote_java_tools_linux ...
rmac's user avatar
  • 11
1 vote
1 answer
864 views

I have a custom Bazel rule which generates a bunch of Java files. The rule is something like this: def _generator_java_impl(ctx): tree = ctx.actions.declare_directory(ctx.attr.name + "_srcs&...
plamkata__'s user avatar
1 vote
1 answer
184 views

I'm adding handlebars to a Java project using bazel. The WORKSPACE installs the maven dependency: ... "com.github.jknack:handlebars.java:4.3.1", ... Within the BUILD file, how do I ...
gph's user avatar
  • 1,361
0 votes
0 answers
183 views

Suppose I am having a simple sh_binary that is invoking a Java binary that depends on JRE/JDK: sh_binary( name = "tool_wrapper", srcs = ["tool_wrapper.sh"], data = ["@...
rumbleD5's user avatar
0 votes
1 answer
1k views

My file "products.yml" is located in src/test/resources/configs folder. I have defined config import in my application.yml in springboot spring: config: import: - optional:...
Dattebayo's user avatar
0 votes
0 answers
5k views

I'm trying to set an environment variable for my mocha_test rule in a Bazel BUILD file to provide the absolute path to a directory that's created using a genrule. The genrule is responsible for ...
rakib's user avatar
  • 131
1 vote
0 answers
608 views

We have a monorepo where we have recently added the MAVEN_REPOS to be used with Bazel. We are using Quarkus 2.9.2.Final. So I am planning to create a CLI Application using Quarkus. But whenever I am ...
Debopam Mitra's user avatar
4 votes
0 answers
626 views

I'm new to Bazel. I installed it using "brew install baselisk", as recommended by the official Bazel docs. bazel --version gives bazel 6.1.2. I then followed the official bazel Java tutorial,...
xdavidliu's user avatar
  • 3,118
0 votes
0 answers
256 views

I want to run a .exe file in bazel build which requires java to run. This executable creates a directory and some files if run successfully. My ExampleGenerator.bzl def _example_generator_impl(ctx): ...
RAHUL S K's user avatar
0 votes
1 answer
795 views

I'd like to use bazel query to get more details about the Java toolchain. Specifically Java source level to be used. From the java_library target I was able to query for the Java toolchain: ...
Gunnar's user avatar
  • 2,357
1 vote
0 answers
217 views

Let's say I have a library such as: scala_library( name = "my_favorite_scala_library", srcs = glob(["*.scala"]), exports = [ "A", "B"...
Frank P.'s user avatar
  • 513
0 votes
2 answers
2k views

How do I query only for the dependencies declared under deps? For example, given the given target java_library( name = "my-library", srcs = glob(["src/main/java/**/*.java"])...
ugabade's user avatar
  • 23
1 vote
1 answer
2k views

When running Bazel coverage on service code, it is crashing on Jenkins pods and also local mac. I want to know does Bazel provide any run efficiency flags to be used in these cases where time does not ...
AhmFM's user avatar
  • 1,842
1 vote
1 answer
1k views

I have a file hello.txt that lives in src/main/resources folder. I am using a java_binary rule and need to pass this hello.txt file as an argument. java_binary( name = "Hello", srcs =...
90abyss's user avatar
  • 7,427
-1 votes
1 answer
1k views

My CustomTest.java has this import: com.google.protobuf.Timestamp I'm using java_test_suite to run tests in my BUILD file like so: java_test_suite( name = "all-tests", srcs = glob([...
90abyss's user avatar
  • 7,427
1 vote
1 answer
978 views

There is a protobuf that my project needs. The protobuf itself is in another repo altogether owned by a completely different team. However they do publish their artifacts on my company's internal ...
90abyss's user avatar
  • 7,427
0 votes
1 answer
610 views

I have a code, which depends on the maven package. I don't want this dependency to be packaged to a resulting JAR. In fact, I want to have only the source code in the resulting package, without all ...
frsv's user avatar
  • 65
1 vote
1 answer
907 views

I am trying to compile and run the example java project. Instead of using the default JDK I have chosen JDK 15 by providing the setting --java_language_version="15". The complete command ...
rumbleD5's user avatar
2 votes
1 answer
2k views

I want to use a specific Azul Zulu JDK for my Java builds. Therefore I have stored it in my repository locally e.g. under tools/zulu19.30.11-ca-jdk19.0.1-macosx_x64. Now I want to configure a java ...
rumbleD5's user avatar
2 votes
0 answers
1k views

Imagine I have a java_binary target triggered by a custom rule that generates source code and places the generated sources under a directory, let's call it "root". So after the code ...
VCODE's user avatar
  • 750
-1 votes
1 answer
134 views

I’m using a “ctx.action.run” command to execute a java.jar program. The java program uses as imputs “bazel-bin/src/files”, which are a preprocessing step of a special C precompilation. This java edit ...
Helí Rodríguez's user avatar
0 votes
1 answer
764 views

I wrote a small application and used java_binary as follows: java_binary( name = "MyCommand", srcs = [ "MyCommand.java", ], visibility = ["//visibility:...
Setheron's user avatar
  • 3,780
0 votes
1 answer
316 views

Getting following error while building java bazel project --> $ bazel build :all INFO: Invocation ID: f3087fe5-67a5-4b0f-a3a8-a61b3bbfa869 WARNING: /home/ess/.cache/bazel/_bazel_ess/...
rishi007bansod's user avatar
1 vote
0 answers
209 views

I am using following command for running coverage for complete Java project module. bazel coverage ... --compilation_mode=dbg --subcommands --announce_rc --verbose_failures --jobs=auto --...
rishi007bansod's user avatar
1 vote
1 answer
504 views

I am trying to provide my own implementation of the System.LoggerFinder and as far as I know I have to specify the class in some resource file /resources/META-INF/services/java.lang.System$...
Jo Bo's user avatar
  • 146
1 vote
2 answers
3k views

I have a Java based test suite running Bazel 4.2.2, and my goal is to collect code coverage regardless of test flakiness. I tried to add these options: bazel coverage ... --runs_per_test=3 --...
Dragan R.'s user avatar
  • 680
0 votes
2 answers
2k views

I am using Bazel with rules_scala. My problem now is how to exclude files from code coverage. So far this is how I am running coverage: rm -rf coverage bazel coverage --combined_report=lcov --...
Omer Levi Hevroni's user avatar
2 votes
0 answers
331 views

I have the following sh_binary sh_binary( name="worker", srcs=["worker.sh"], ) and the worker.sh looks like #!/bin/bash celery -A twoopstracker worker -l INFO &> /...
E_K's user avatar
  • 2,249
2 votes
2 answers
7k views

I'm trying to use the java-language-server vscode extension, but I am getting an error that the extension is not starting up: [Error - 11:07:14 AM] Starting client failed Error: spawn UNKNOWN at ...
timsexperiments's user avatar
2 votes
1 answer
489 views

I'm trying to move to bazel from maven. I saw the tutorial in bazel documentation and it has a sample WORKSPACE file. link load("@bazel_tools//tools/build_defs/repo:http.bzl", "...
Pavan Kumar Lekkala's user avatar
0 votes
1 answer
826 views

Facing below issue when running bazel run //api/deployment:mynamespace.apply Please let me know if anyone also faced same issue. Bazel Version:- 4.2.1 Processor:- Apple Mac M1 ERROR: /private/var/tmp/...
akki_java's user avatar
  • 613
0 votes
1 answer
2k views

We are seeing duplicate builds of the same target in Bazel and wondering what could cause this. Here is a sample output: [52,715 / 55,135] 12 action running Bazel package: some-pkg - Target: ...
Gunnar's user avatar
  • 2,357
0 votes
1 answer
2k views

I'd like to check a text file in our monorepo codebase via JUnit tests. JUnit tests are executed via bazel test command. How can I configure Bazel to pass the source code directory path (not cached ...
Poulad's user avatar
  • 1,361