Protocol buffers bazel重新编译protobuf的次数超出了需要

Protocol buffers bazel重新编译protobuf的次数超出了需要,protocol-buffers,bazel,protobuf-c,Protocol Buffers,Bazel,Protobuf C,我跟着,效果很好 但有时(并非总是)当我更改一些与protobuf和rebuild完全无关的应用程序级代码时,bazel会花费所有时间重新编译protobuf 有什么建议我可以尝试调试这个?< p>我也有同样的问题:OntBuffC++似乎重新编译了每个构建。建造这个项目的时间从3秒到30秒 我使用以下命令启动构建: bazel build -c dbg --config=asan <target> bazel run -c dbg --config=asan <target&

我跟着,效果很好

但有时(并非总是)当我更改一些与protobuf和rebuild完全无关的应用程序级代码时,bazel会花费所有时间重新编译protobuf


有什么建议我可以尝试调试这个?

< p>我也有同样的问题:OntBuffC++似乎重新编译了每个构建。建造这个项目的时间从3秒到30秒

我使用以下命令启动构建:

bazel build -c dbg --config=asan <target>
bazel run -c dbg --config=asan <target>

我也有同样的问题。构建现在需要30秒,而不是之前的5秒。每次新构建开始时,它都会重新编译所有的protobuf…谢谢!我没有使用--config=asan,但仍然得到了重新编译…--config=asan只是一种包含.bazelrc中定义的所有标志的方法。当您运行
bazel build
时,检查构建中包含哪些标志可能很有用(在“.bazelrc”中可能配置了一些标志)或者其他方式。你是否建议我检查我正在使用的标志,并确定导致问题的标志?我的重新编译问题是间歇性的,不幸的是…你猜是哪个标志导致了重新编译?
# Address sanitizer
build:asan --strip=never
build:asan --copt -fsanitize=address
build:asan --copt -DADDRESS_SANITIZER
build:asan --copt -DDYNAMIC_ANNOTATIONS_ENABLED=1
build:asan --copt -g
build:asan --copt -fno-omit-frame-pointer
build:asan --copt -fsanitize-address-use-after-scope
build:asan --linkopt -fsanitize=address
build:asan --dynamic_mode=off