48 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
254
views
How can I make Telegraf create TimescaleDB columns as double precision[] when ingesting array data from MQTT?
I am trying to configure Telegraf to ingest array data from an MQTT topic into TimescaleDB.
My goal is for array-like values to end up as double precision[] instead of text.
For example, if I prepare ...
0
votes
0
answers
55
views
Bazel with GHS arm compiler failing with archiver command
I am using GHS compiler in embedded project to generate .elf and .hex files.
I have configured CcToolchainConfigInfo as below:
cc_toolchain_config.bzl
def _impl(ctx):
# declare toolpaths (...
0
votes
0
answers
47
views
How can I pass version from the CLI to Bazel macros wrapping macros from rules_oci?
I currently have two macros wrapping oci_tarball and oci_push macros from rules_oci as below:
load("@rules_oci//oci:defs.bzl", "oci_push")
load("@rules_oci//oci:defs.bzl",...
1
vote
1
answer
573
views
Private Bazel registry authentication issues with GitHub
I have a private Bazel registry in my GitHub organization. I am trying to use that registry with my Bazel builds.
Calling Bazel build or query commands with my private remote Bazel registry, expecting ...
0
votes
1
answer
241
views
How to specify multiple labels in Bazel rule srcs?
This works:
"srcs": attr.label_list( allow_files=[".proto"] ),
But I want also to pass in ProtoInfo targets.
"srcs": attr.label_list( allow_files=[".proto"] )
...
0
votes
1
answer
474
views
In Bazel, how to check validity of a provided --action_env value?
In a project built with Bazel I'm using --action_env to manually modify the build environment in order to avoid unwanted cache hits (this is a current workaround for a more sophisticated solution, but ...
0
votes
1
answer
147
views
Meaning of '@' sign in load fun
I'm trying to find anything about '@' sign in load function in Bazel. We can load things like this
load("//foo/bar:file.bzl", library_alias )
But also like this
load("@bazel_tools//...
5
votes
1
answer
1k
views
Bazel execute python script before running cc_binary
I am trying to create a bazel target which will run c++ binary from .cpp file, which is dynamically generated by python script.
Lets say I have generator.py which creates in the dir a generated.cpp ...
2
votes
1
answer
489
views
Unable to use py_binary target as executable in a custom rule
I have a py_binary executable target, and want to use this from a custom rule. I am able to get this to work, but only by duplicating the dependencies of my py_binary target with my custom rule. Is ...
1
vote
1
answer
2k
views
Declaring both directory and inner files in a Bazel rule
I want a Bazel rule which creates a directory, takes a bunch of files, and creates an ISO out of that directory (the ISO is the intended output here, the other files are just byproducts).
# Declare ...
0
votes
1
answer
502
views
How to write content to local disk for starlark
I want to know how to dump something (say, some string) to local disk.
I found there's actions.write API , but seems it only creates an action, but not executes it.
I'm wondering how I could execute ...
0
votes
1
answer
538
views
Why doesn't this rule create a file every time it is built?
I write the below bazel rule for incremental test.
This rule(foo_library) has a dependency property.
When there are no dependencies, it creates a file with its own name, filling the contents of the ...
0
votes
1
answer
411
views
When use Pants to build Django it raise "ModuleNotFoundError: No module named"
I configured Pantsbuild for our Django project, and everything worked neatly. Here is my BUILD file:
python_requirement(
name="django",
requirements=["django==4.1.1"],
)
...
4
votes
1
answer
1k
views
Instantiating a Bazel macro twice with same generated output file
Suppose I have a Bazel macro that is using a generator rule to generate an output file given an input file:
def my_generator(
name,
input_file,
output_file,
**kwargs):
...
0
votes
1
answer
2k
views
How can I pass an alias value to a bazel function?
I have the following alias defined in a BUILD file:
alias(
name = "platform",
actual = select({
":macos_x86_64": "macos_x86_64",
":...