bazel doesn't generate runfiles directory #20781
Labels
awaiting-user-response
Awaiting a response from the author
team-Local-Exec
Issues and PRs for the Execution (Local) team
type: bug
untriaged
Description of the bug:
I write a rule to genrate a source file, then this source file used by other source file. maybe a little complicate is that this rule need run another cc_binary, this cc_binary take some proto and a template file as input, then write that final source file as output.
briefly:
cc_test: loader_impl_test depend cc_proto_plugin: pb_code_generator_plugin, and pb_code_generator_plugin denpend cc_binary: pb_code_generator, pb_code_generator take proto and template file as input, then generate file source file
notice loader_impl.h was outs of by pb_code_generator_plugin not pb_code_generator, thoug it's writen by pb_code_generator.
but I find template source file was not contained in any runfiles directory.
bazle-5.3.1 build //... will failed, log:
below is BUILD file and rule's bzl file.
cat src/data/BUILD
cat bazel/pb_code_gen_plugin.bzl
some struggles
if add
to target pb_code_generator, some thing changes
run bazel-5.3.1 build //src/data:loader_impl_test at first, will fail for same reason, but if run bazel-5.3.1 build //src/data:loader_impl_test after bazel-5.3.1 build //... will success.
my goal is run bazel-5.3.1 build //src/data:loader_impl_test at first can also build success, how to fix it?
here is a small demo, https://github.com/xiedeacc/demo.git
on master branch
on error branch
Which category does this issue belong to?
Local Execution
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
https://github.com/xiedeacc/demo.git
Which operating system are you running Bazel on?
ubuntu 22.04
What is the output of
bazel info release
?5.3.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.release 5.3.1- (@non-git)
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
cannot find
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: