bazel: proto_library: warning: directory does not exist
Description of the problem / feature request:
Building proto_library targets for Well Known Types in @com_google_protobuf emits warnings like the one below. The build succeeds, but it would be nice if the warning can be fixed or removed.
$ bazel build @com_google_protobuf//:any_proto
...
INFO: From Generating Descriptor Set proto_library @com_google_protobuf//:any_proto:
external/com_google_protobuf: warning: directory does not exist.
...
Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
# WORKSPACE
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "com_google_protobuf",
remote = "https://github.com/protocolbuffers/protobuf",
tag = "v3.6.1.3",
)
git_repository(
name = "bazel_skylib",
remote = "https://github.com/bazelbuild/bazel-skylib",
tag = "0.6.0",
)
bazel build @com_google_protobuf//:any_proto
What operating system are you running Bazel on?
Linux amd64
What’s the output of bazel info release?
release 0.21.0
This does not happen in 0.20.0, but it does happen in 0.22.0rc2.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 14
- Comments: 41 (26 by maintainers)
Commits related to this issue
- Do not add a --proto_path argument to the proto compiler invocation there are no .proto sources in it. This prevents protoc from complaining about a nonexistent directory in sandboxed mode and is goo... — committed to siberex/bazel by lberki 5 years ago
- Automated rollback of commit 5c83cd9b789f50d5c4e8cf0b774836128dce1cc2. *** Reason for rollback *** Breaks Bazel downstream: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1067#24a0... — committed to siberex/bazel by lberki 5 years ago
- Make proto blacklisting work when virtual import directories are present. This fixes the fallout from https://github.com/bazelbuild/bazel/commit/ce65de4ee8e006137c8d927fa474384c0d940cb2 . Afterparty... — committed to bazelbuild/bazel by lberki 5 years ago
- Do not add a --proto_path argument to the proto compiler invocation there are no .proto sources in it. This prevents protoc from complaining about a nonexistent directory in sandboxed mode and is goo... — committed to irengrig/bazel by lberki 5 years ago
- Automated rollback of commit 5c83cd9b789f50d5c4e8cf0b774836128dce1cc2. *** Reason for rollback *** Breaks Bazel downstream: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1067#24a0... — committed to irengrig/bazel by lberki 5 years ago
- Create a virtual proto import directory for proto_library rules with generated sources and ones with proto_source_root= set. Fixes #7157. RELNOTES: None. PiperOrigin-RevId: 256973588 — committed to irengrig/bazel by lberki 5 years ago
- Automated rollback of commit bcc9812e27d172d964dd728b70651fe0b972df0e. Fixes #8832. *** Reason for rollback *** Breaks internal tests *** Original change description *** Create a virtual proto im... — committed to irengrig/bazel by scentini 5 years ago
- Create a virtual proto import directory for proto_library rules with generated sources and ones with proto_source_root= set. Fixes #7157. Third time is the charm! This time, I made a flag for the fi... — committed to irengrig/bazel by lberki 5 years ago
- Make proto blacklisting work when virtual import directories are present. This fixes the fallout from https://github.com/bazelbuild/bazel/commit/ce65de4ee8e006137c8d927fa474384c0d940cb2 . Afterparty... — committed to irengrig/bazel by lberki 5 years ago
@joshburkart
Can confirm the error still exists in Bazel 3.x.x
The problem was created by
proto_genrule defined in https://github.com/protocolbuffers/protobuf project.Correct issue is reported here: https://github.com/protocolbuffers/protobuf/issues/6049 I created a PR fixing it: https://github.com/protocolbuffers/protobuf/pull/9438
I’m closing this issue, because I didn’t discover any warnings produced by the rules that are part of Bazel.
Update: I have a change under review that will fix this issue. Let’s see how the review goes. It’s not complicated, so it shouldn’t be problematic.
Update: I have a third fix. To verify, I:
Third time is the charm!
Ping again, this is extremely annoying and spammy.
Has this been fixed in bazel 0.28.1 or do we have to wait for 0.29.0?