Hi,
> [...] check out a new branch?, move to a different project path), bazel
> re-downloads the same large distribution files over and over again.
> [...] Is this a known issue?
yes. And unfortunately, there are some experimental solutions, but the
long-term vision is still a bit unclear.
* If a hash-sum is specified (which is a good idea anyway),
--experimental_repository_cache; don't forget to create an empty directory
where the path points to (if it does not point to an existing directory,
this option is silently ignored).
It caches distribution files based on the specified hash sum (where sha1 and
sha256 are considered diffrent cache keys and the file is only cached under
the key that was specifed on download).
The is no pruning of the cache, so obsolete entries have to be removed
manually (somehow you're supposed to tell if a file is needed or not by
its hash; or you just buy more disk space).
* With bazel at head, there is an additional --experimental_distdir option.
It can be specified several times and before each download, all specified
directories are checked for a file with the same basename and if found,
the hash sum is used to verify it is indeed the correct file (so again,
specifying a hash sum is necessary, and again, it's a good idea anyway).
This allows to manually download all files ahead of time and also makes
it more easy to share distfiles with other build tools
(e.g., --experimental_distdir=/usr/ports/distfiles).
This option handles the directories read-only, so fetching and clean up
has to be done manually.
I hope you can live with these experimental features for the time being.
Best,
Klaus
--
Klaus Aehlig
Google Germany GmbH, Erika-Mann-Str. 33, 80636 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Paul Terence Manicle, Halimah DeLaine Prado