79611259

Date: 2025-05-07 19:04:20
Score: 0.5
Natty:
Report link

The best tool we use at our place is the "let the computer figure it out" approach; instead of pruning deps they're generated by default using gazelle.

The default is to generate, and only if you mark things in your build files will it "keep" it... The tool you're describing could certainly work, but I think it's working backward instead of letting the file dependencies themselves inform bazel on what the BUILD files should look like.

It works really well for Go and OK for Java in my experience, we haven't managed to get it going for Python though. Its main downside as a toolchain is you have to hook it into how you run your bazel commands if you don't want to keep rerunning the "regenerate" command, but I think it's worth it for the "autoimport" capabilities that you get.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Matt Kornfield