@Calimero AFAIU this would need me to check and verify which specific submodule commits are being used each time Mozc releases a new tagged version and update not only the PKGBUILD but also Bazel's scripts, which would be kind of a big amount of work, and for what? If you don't keep the submodules around in your $srcdir (which is the only reason why you'd need to re-clone them all the time) you'd still need to re-clone them all over again anyway, only the cloning would happen behind the scenes, by makepkg calling git as part of fetching the PKGBUILD's sources, instead of git doing it explicitly as part of prepare(). And this doesn't even take into account the fact that the already fragile Bazel would quite possibly go bonkers due to making it use external dependencies and would invalidate its cache which would increase the build times tenfold. Granted, that's not a 100% given, but knowing Bazel and its quirky nature it could very well happen.
In short, I don't really see a compelling need for changing the way the submodules are handled. Also, using dynamic linking via globally installed packages is unfortunately not supported either by Mozc (it explicitly only supports static linking) or by Bazel (it would require me to rewrite many of upstream's setup scripts).
EDIT: To clarify, my main issue is with Bazel, not with using git submodules as PKGBUILD sources. But to put my money where my mouth is, I'll experiment with such a setup in the next few days and verify firsthand whether Bazel will behave nicely or not.
EDIT 2: So after deliberating on it a bit more I realized I was talking nonsense. The submodules are updated via git independently of Bazel anyway, so keeping local copies of them around and copying them into $srcdir instead of fetching them into it from upstream should look exactly the same to Bazel and its cache system. Also, fetching just the latest changes of the submodules instead of cloning them from scratch every time is obviously an actual improvement because it's faster and it saves on bandwidth (I mean, it's almost like git was built to work like this in the first place...).
So, yeah. I'm just going to blame it on the heatwave that's been scrambling my brain for the past month. Thanks for the suggestion :)
Pinned Comments
Nocifer commented on 2022-05-29 21:53 (UTC) (edited on 2023-08-22 09:33 (UTC) by Nocifer)
If you're getting compilation errors, please delete your Bazel cache (
~/.cache/bazel
by default).