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

Most upvoted comments

@joshburkart

Can confirm the error still exists in Bazel 3.x.x

The problem was created by proto_gen rule 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?