[roll] Roll fuchsia [bazel] Generate @gn_targets repository at regeneration time. Each bazel_action() GN target has a corresponding directory that contains the content of its @gn_targets external repository, consisting of BUILD.bazel files and symlinks to actual Ninja artifact locations. Before this CL, each @gn_target directory was populated at build time, before invoking the bazel_action.py script to invoke Bazel and process results / outputs. After this CL, the directories are populated by //build/regenerator, which allows performing Bazel queries just after `fx set` / `fint set` on a clean checkout, before building anything. This will be used in future CLs to implement advanced //build/api/client commands. Note that, as a special case, a placeholder file for @gn_targets//:all_licenses.spdx.json is created by regenerator with a timestamp of 0 (!). This is to ensure that the file exists when performing Bazel queries before the build. However, that specific file will be updated by Ninja with proper content, as it is the output of a GN action() dependency of the corresponding parent GN bazel_action() target. As a special consistency check, ActionsMap.update_gn_targets_symlink() is updated with a new optional argument 'check_license_timestamp' to verify that the file's timestamp is no longer 0, and panic otherwise. This is invoked by bazel_action.py to catch any failure to properly update the license file. Benchmarking with `build/regenerator -v` shows that this new regeneration step, named @gn_targets, has negligible cost. ``` Timing results for all regeneration steps: 6.22s gn gen 0.02s patching build.ninja 0.48s generate_prebuild_idk 0.69s @fuchsia_in_tree_idk 0.00s product_bundles.json 0.00s tests.json 0.05s bazel_content_hash_files 0.00s prebuilt_build_ids 0.00s remote_services.bazelrc 0.00s @fuchsia_build_info 0.01s bazel_workspace 0.01s @gn_targets 0.00s ninja_edge_weights.csv 0.00s regenerator_inputs.txt 0.00s build.ninja.d ``` NO_IFTTT=No need to change BUILD.gn as the schema didn't change. Original-Bug: 427455042 Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1399534 Original-Revision: b9e2850786740169ac4a0e8e3ca55f5e45bf59b7 GitOrigin-RevId: 2b96e44e528c7dccd4f059411df66dadc5507ad0 Change-Id: Ief87cefb6077a6e1e61728f249654bee35277f21
This repository contains Fuchsia's Global Integration manifest files.
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 in one of the communication channels documented at get involved.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.