Support multi-symbol replace_load correctly (#1366)

The logic for removing old loading symbols replaced by `replace_load` was flawed. It would leave behind old (redundant) loads, iff the `replace_load` was to replace two symbols from the same location. This change simplifies how loads are replaced by simply keeping track of non-replaced loads rather than trying to remove from the list with index manipulation.

I've added a few more test cases. Most of these new tests will fail on the old code.
3 files changed
tree: 67199d71ad8252a725c130766b8b445ebba002ef
  1. .bazelci/
  2. api_proto/
  3. build/
  4. build_proto/
  5. buildifier/
  6. buildozer/
  7. bzlenv/
  8. config/
  9. convertast/
  10. deps_proto/
  11. differ/
  12. edit/
  13. extra_actions_base_proto/
  14. file/
  15. generatetables/
  16. labels/
  17. lang/
  18. release/
  19. tables/
  20. testutils/
  21. unused_deps/
  22. warn/
  23. wspace/
  24. .bazelrc
  25. .bazelversion
  26. .gitignore
  27. .mailmap
  28. .pre-commit-config.yaml
  29. BUILD.bazel
  30. CODEOWNERS
  31. CONTRIBUTING.md
  32. CONTRIBUTORS
  33. go.mod
  34. go.sum
  35. launcher.js
  36. LICENSE
  37. MODULE.bazel
  38. README.md
  39. status.py
  40. update_generated.sh
  41. WARNINGS.md
  42. WORKSPACE
  43. WORKSPACE.bzlmod
README.md

Buildtools for bazel

This repository contains developer tools for working with Google's bazel buildtool.

Build status

Setup

See instructions in each tool's directory.