This also started to hit me in 2.1.37. It can be especially annoying when editing hairy mathjax equations as it breaks the rendering and you have to manually remove the spans.
Removing that seems to have worked. I thought running git clean -fd prior to build would be enough, but I see now there’s a ts/.gitignore. Didn’t come to my mind that could be an issue since it wasn’t during the previous successful build two days ago.
Anyway, I’m just cp -r'ing the repo to a /tmp folder, there’s no change to any build files (other than incrementing .bazelversion, since 3.7.1 bugs out. Haven’t checked with 3.7.2 yet).
Perhaps you’re breaking symlinks by doing that. There is no need to copy the source to /tmp; the build products are placed in /tmp automatically, and moving the folder will cause more things to be recompiled than necessary.
The “need” is Arch’s packaging tool, building outside its builddir is considered sinful. But now that I’ve tested that it actually doesn’t bug out when one does, I guess I’ll ignore that from now on.
(It seems bazel is using a separate cache in my ~ anyway, though. Also, that .bazelversion really is a hard rather than minimum requirement, ie. bazel 3.7.2 also throws. Maybe better to check what bazel --version returns.)
.bazelversion is a pinned version for reproducible builds. Like any other version in the repo, nothing is stopping you from changing it to something else, but you will need to test that it doesn’t break anything.