60 questions
0
votes
0
answers
28
views
How to get individual time for test methods when the test class times out (only class-level timeout info shown, need to identify slow test methods)
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 ...
0
votes
0
answers
15
views
Trying to run a kt_jvm_binary with remotejdk11 but it does not appear in the runfiles at runtime
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 = "...
2
votes
0
answers
97
views
Why can't bazel find @local_jdk repo
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 ...
0
votes
0
answers
73
views
configurable attribute "actual" in @google_protobuf3//:google-protos doesn't match this configuration
Facing below issue on bazel build on M1 Pro (MacOS - 13.6.5)
bazel build :all --config=mac64
WARNING: Option '...
0
votes
1
answer
80
views
Use sqlite JDBC with Bazel
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(...
0
votes
1
answer
166
views
Is it possible to specify input files in bazel with $ in the filename?
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"...
0
votes
1
answer
114
views
bazel run @maven//:pin results in error: FileNotFoundException
➜ 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:...
0
votes
1
answer
184
views
Cannot locate runfiles directory in bazel java
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.)...
0
votes
1
answer
181
views
Bazel dependency analysis
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 ...
0
votes
1
answer
93
views
GRPC circular dependencies in Bazel
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:
...
0
votes
1
answer
211
views
Accessing files listed in a data block
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
| `--...
1
vote
0
answers
292
views
Unable to configure custom java toolchain with bazel
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 ...
2
votes
0
answers
202
views
IntelliJ IDEA Bazel Test: How to stop optimizing out variables while at a breakpoint in the debugger?
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 ...
0
votes
1
answer
204
views
How do I pass arguments to Bazel java wrapper?
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 ...
0
votes
0
answers
36
views
How can I stop java_test using cached test code rather than rebuilding the test code
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 ...