[roll] Roll fuchsia [build][bazel] Keep output_base when updating workspace.

Before this CL, update_workspace.py would clear the entire
Bazel output_base whenever the content of the Bazel workspace
needed to be updated. This could take up to 27s on a powerful
workstation. This CL makes the script complete in 0.6s instead!

Cleaning the whole output_base is not necessary, as it can hold
3.4 GiB of build artifacts that can totally be reused for the
next Bazel invocation, since Bazel doesn't use timestamp, only
content hashes, to run build actions.

This CL keeps all build artifacts in the output_base, but
still clears its `external/` sub-directory which holds the
content of external repositories.

In Bazel, repository rules are not hermetic or reproducible,
and making them incrementally correct is very difficult. As
the Fuchsia build relies on more and more third-party
repository rules, it is impossible to guarantee correctness.

Nuking the external/ sub-directory forces all repository
rules to re-run from scratch after an update, which is still
considerably faster than recreating all build artifacts.

NOTE: This CL does not address the fact that even a simple
`git switch` will force a dozen successive Ninja -> Bazel
invocations, even if the latter have nothing to do. This
is a completely different issue, which will be addressed
separately.

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1019832
Original-Revision: 57429a7fa52e3dba9bb0ac2a49bf0f302a582602
GitOrigin-RevId: 2669981b9f5bec2a29d361f3cb477dd208ac69a8
Change-Id: I27936ca9c54d8b7a8b8aec6fe97613680ee6d081
1 file changed
tree: bcd08f32ab49a614b78d350cc1282a854cb3c703
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.