buildtools: unused_deps not working

unused_deps stopped working for us about 6 months ago. When we run it, it tries to open files that don’t exist.

mkilpatrick-mpro:alpha mkilpatrick$ unused_deps src/com/yext/bulk/common/...
2018/10/15 11:43:37 running: bazel query --tool_tag=unused_deps --keep_going --color=yes --curses=yes kind('(java|android)_*', src/com/yext/bulk/common/...)
2018/10/15 11:43:37 running: bazel build --tool_tag=unused_deps --keep_going --color=yes --curses=yes src/com/yext/bulk/common/...
Using remote cache (va). Disable by setting BAZEL_NO_CACHE=1
WARNING: Option 'experimental_remote_spawn_cache' is deprecated
INFO: Analysed 57 targets (0 packages loaded).
INFO: Found 57 targets...
INFO: Elapsed time: 0.780s, Critical Path: 0.01s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action

2018/10/15 11:43:39 open /private/var/tmp/_bazel_mkilpatrick/ecc7778653efb77408ccae0a11894b62/execroot/yext/bazel-out/darwin-fastbuild/bin/src/com/yext/bulk/common/fieldnames/fieldidentifier/canonicalizer/canonicalizer.jar-2.params: no such file or directory
2018/10/15 11:43:39 open /private/var/tmp/_bazel_mkilpatrick/ecc7778653efb77408ccae0a11894b62/execroot/yext/bazel-out/darwin-fastbuild/bin/src/com/yext/bulk/common/fieldnames/fieldidentifier/uuid/uuid.jar-2.params: no such file or directory
2018/10/15 11:43:39 open /private/var/tmp/_bazel_mkilpatrick/ecc7778653efb77408ccae0a11894b62/execroot/yext/bazel-out/darwin-fastbuild/bin/src/com/yext/bulk/common/fieldnames/fielddefinition/profilefieldnode/profilefieldnode.jar-2.params: no such file or directory
2018/10/15 11:43:39 no deps attribute for protobuf in /Users/mkilpatrick/alpha/src/com/yext/bulk/common/fieldnames/fieldidentifier/BUILD
2018/10/15 11:43:39 open /private/var/tmp/_bazel_mkilpatrick/ecc7778653efb77408ccae0a11894b62/execroot/yext/bazel-out/darwin-fastbuild/bin/src/com/yext/bulk/common/fieldnames/fieldidentifier/protobuf_compile_imports.jar-2.params: no such file or directory
2018/10/15 11:43:39 open /private/var/tmp/_bazel_mkilpatrick/ecc7778653efb77408ccae0a11894b62/execroot/yext/bazel-out/darwin-fastbuild/bin/src/com/yext/bulk/common/fieldnames/fieldidentifier/protobuf_compile_imports.jdeps: no such file or directory
2018/10/15 11:43:39 protobuf_compile_imports not found in /Users/mkilpatrick/alpha/src/com/yext/bulk/common/fieldnames/fieldidentifier/BUILD
2018/10/15 11:43:39 no deps attribute for protobuf in /Users/mkilpatrick/alpha/src/com/yext/bulk/common/subfield/BUILD
2018/10/15 11:43:39 open /private/var/tmp/_bazel_mkilpatrick/ecc7778653efb77408ccae0a11894b62/execroot/yext/bazel-out/darwin-fastbuild/bin/src/com/yext/bulk/common/subfield/protobuf_compile_imports.jar-2.params: no such file or directory
2018/10/15 11:43:39 open /private/var/tmp/_bazel_mkilpatrick/ecc7778653efb77408ccae0a11894b62/execroot/yext/bazel-out/darwin-fastbuild/bin/src/com/yext/bulk/common/subfield/protobuf_compile_imports.jdeps: no such file or directory
2018/10/15 11:43:39 protobuf_compile_imports not found in /Users/mkilpatrick/alpha/src/com/yext/bulk/common/subfield/BUILD
2018/10/15 11:43:39 no deps attribute for protobuf in /Users/mkilpatrick/alpha/src/com/yext/bulk/common/BUILD
2018/10/15 11:43:39 open /private/var/tmp/_bazel_mkilpatrick/ecc7778653efb77408ccae0a11894b62/execroot/yext/bazel-out/darwin-fastbuild/bin/src/com/yext/bulk/common/protobuf_compile_imports.jar-2.params: no such file or directory
2018/10/15 11:43:39 open /private/var/tmp/_bazel_mkilpatrick/ecc7778653efb77408ccae0a11894b62/execroot/yext/bazel-out/darwin-fastbuild/bin/src/com/yext/bulk/common/protobuf_compile_imports.jdeps: no such file or directory
2018/10/15 11:43:39 protobuf_compile_imports not found in /Users/mkilpatrick/alpha/src/com/yext/bulk/common/BUILD
No unused deps found.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

The above fix is working for me.