bazel Questions

2

Solved

In bazel I often see following code: srcs = [ "foo/bar.c", ] + select({ "@org_tensorflow//tensorflow:linux_x86_64": [ "foo/baz.c", ], "//conditions:default": [], }) But how do I go with c...
Primatology asked 9/5, 2019 at 18:22

4

I am new to python world and I have followed a few articles to set python on my system. I need python to build my project through bazel. When I build my project on local, I get the following error....
Choosy asked 7/4, 2022 at 8:36

3

Solved

Say I have a custom rule, my_object. It looks like: my_object( name = "foo", deps = [ //services/image-A:push, //services/image-B:push, ] ) Where the labels in deps are rules_docker's cont...
Bowse asked 8/11, 2019 at 6:18

2

I have been trying to run all JUnit tests in a directory with Bazel. As far as I know, the java_test rule is only capable of running a specific class. However, I'm looking for behavior more like mv...
Orleans asked 1/4, 2020 at 20:55

3

I am trying to query the list of Bazel targets having public visibility. Some of our Bazel targets have visibility specified explicitly, e.g.: cc_library( name = "xxx_util", visibility = ["//vis...
Aspersion asked 29/12, 2017 at 16:14

1

I have a SavedModel in a folder (generator_model_final) with the following content: - saved_model.pb - variables |- variables.data-00000-of-00002 |- variables.data-00001-of-00002 |- variables.in...
Gallonage asked 20/6, 2020 at 9:17

4

Ideally, I'd like a list of output files for a target without building. I imagine this should be possible using cquery which runs post-analysis, but can't figure out how.
Clansman asked 9/10, 2018 at 20:48

3

Suppose I have the following BUILD file py_library( name = "foo", src = ["foo.py"], data = ["//bar:data.json"], ) How should I refer to the data.json in foo.py file? I wanted to have somethin...
Autoclave asked 9/1, 2017 at 17:30

2

Solved

I'm using the confluent-kafka-go library inside my go binary, and this library needs to be linked against librdkafka. Other targets in my project use librdkakfa, so I have produced the static librd...
Congius asked 16/4, 2019 at 0:34

5

I was following the instructions on https://docs.bazel.build/versions/master/install-ubuntu.html#install-with-installer-ubuntu and trying to install bazel on Ubuntu. When I run step 2: sudo apt u...
Brittne asked 24/5, 2020 at 6:41

5

Solved

For running all the tests under a target I use the command line command bazel test //src/code_path:target_name What should be additional parameters to run a test single_test from the above targe...
Spruik asked 14/2, 2020 at 21:11

4

Solved

In Bazel, given a build target, how would a script (which is running outside of Bazel) get the path to the generated file? Scenario: I'm using Bazel to do the build, and then when it's done, I wan...
Duero asked 17/12, 2017 at 21:25

3

I have a C codebase I'm trying to build with Bazel. This codebase is covered with unit tests that use the fff library for generating function mocks in C. The actual library is not important though,...
Newton asked 27/12, 2018 at 20:20

1

Solved

Bazel uses the concept of visibility to limit which targets can depend on which targets. Given a target //my:foo, I am looking for a way to query Bazel for a list of targets visible to //my:foo. Ba...
Clan asked 2/7, 2023 at 19:53

6

Even after syncing with Bazel, the files are still displaying as "unsynced" in IntelliJ. I've tried moving to a previous version of Bazel, but to no avail. Any recommendations here?
Dungdungan asked 7/9, 2019 at 21:12

3

Solved

I have a java_binary target in my workspace that I'm later passing as an executable to ctx.actions.run inside the rule. So far so good. Now I want to debug this java_binary while Bazel is executin...
Cretin asked 28/2, 2020 at 16:39

5

Solved

I want a Bazel rule that is able to build multiple targets at once. So basically something like this: build_all( name = "build_all", targets = [ "//services/service1:build", "//services/servic...
Edlin asked 1/2, 2020 at 21:36

5

I have a my_module.py file that implements my_module and a file test_my_module.py that does import my_module and runs some tests written with pytest on it. Normally I run the tests by cding into t...
Texture asked 10/10, 2019 at 15:39

3

Solved

I want to use the go lint tool to generate a BUILD file for bazel. I would have a go binary that would perform something like this bash script: #!/bin/bash cat <<EOF > BUILD # THIS FILE...
Ferment asked 13/7, 2016 at 17:47

1

For my electron app project (used boilerplate), I want to execute a few selenium node commands using selenium-webdriver and chromedriver. The problem is, when I added the module selenium-webdriver...
Kuhlman asked 18/7, 2019 at 17:12

1

Solved

I have a .proto protobuf definition file in a dir and I'm building a go library from it with Bazel like so (BUILD.bazel file below generated using gazelle): load("@rules_proto//proto:defs.bzl&...
Oomph asked 13/2, 2023 at 23:34

3

Solved

I'm trying to build Tensorflow from source (if I install directly it works fine but I'm trying to get AVX2/FMA extensions support as I can't use CUDA/GPU) and I'm following this tutorial to build T...
Keyhole asked 25/1, 2021 at 16:17

4

Solved

By default, Bazel runs tests in a parallel fashion to speed things up. However, I have a resource (GPU) that can't handle parallel jobs due to the GPU memory limit. Is there a way to force Bazel to...
Fala asked 29/1, 2016 at 17:34

1

I'm trying to build MediaPipe as library on macOS to be able to use it in a desktop project with CMake, but I'm running into issues. I'm trying to convert the Hello World example to a library, usin...
Swag asked 11/2, 2020 at 13:19

3

I need to run my tests in the bezel. how can I solve this mysterious problem? I have a nestjs project contains multiple apps and libs. When I run the test yarn jest --config ./jest.config.json libs...
Beaman asked 16/7, 2020 at 19:22

© 2022 - 2024 — McMap. All rights reserved.