When playing around with dependencies and needs warnings triggered for a run are not shown consistently.
Steps to reproduce (sample usage in https://github.com/eclipse-score/persistency):
# (valid) build of docs target:
$ bazel run -- //:docs
# remove lines which should trigger a warning
$ git diff
diff --git a/BUILD b/BUILD
index 8772102..9b5957b 100644
--- a/BUILD
+++ b/BUILD
@@ -18,10 +18,6 @@ load("//:project_config.bzl", "PROJECT_CONFIG")
# Creates all documentation targets:
# - `:docs` for building documentation at build-time
docs(
- data = [
- "@score_platform//:needs_json",
- "@score_process//:needs_json",
- ],
source_dir = "docs",
)
# build docs target again but not trigger the expected warnings
the warnings are only visible if the previous created _build folder is deleted.