This repository contains a few external dependencies:
This document provides simple instructions on how to update these dependencies to newer versions.
When to update: the
getting-started
sample (this repo) automatically tracks a stable-ish branch of sdk-integration. Please coordinate with the repository owners before sending any change to the sandbox/training_1 branch. Open a new bug in fxbug.dev
This repo tracks a stable-ish branch of the Fuchsia Bazel SDK. In order to update the sdk-integration stable-ish branch with newer commits from its main branch, you need to follow the steps below:
git clone https://fuchsia.googlesource.com/sdk-integration
cd sdk-integration
git switch sandbox/training_1
For each commit you need to cherry-pick: git cherry-pick <HASH>
In a separate directory, ensure that this change works:
git clone https://fuchsia.googlesource.com/sdk-samples/getting-started
cd getting-started
Follow the instructions in README.md, but on every bazel
invocation, you should append the following argument. Replace SDK_INTEGRATION_DIR
with the absolute path of where you have the modified sdk-integration repo from the steps above. --override_repository=rules_fuchsia=SDK_INTEGRATION_DIR/bazel_rules_fuchsia
If all looks good, send a CL:
git push origin HEAD:refs/for/sandbox/training_1
Get a review and merge the cherry-pick(s).
When merged, the getting-started repo will automatically pick up the new changes since Bazel is set to track the branch.
When to update: Please coordinate with the repository owners before sending updates to the Core SDK. If needed, open a new bug in fxbug.dev
Navigate to linux SDK repo
Find the entry with the label “latest” in the “Instances” list. Click on it.
Take note of the “SHA256” field, something like “52c90bdf7a7bdc1352dd0de93ceea53a260b391a3d1e81ca20c909a60686753c”
Take note of the “version” field, something like “7.20220411.3.1”
Navigate to Mac SDK repo
find the entry with the label “latest” in the “Instances” list
Ensure that the “version” field is identical to the Linux version you found above. If they are different, go back to the “Instances” list and find one version that has both Mac and Linux instances.
Take note of the “SHA256” field
Open the WORKSPACE.bazel file
Update the fuchsia_sdk_repository
rule accordingly:
version
should be pasted in cipd_tag
SHA256
for Linux should be pasted in linux
SHA256
for Mac should be pasted in mac
Follow the instructions in the After a version update section
When to update: Frequent updates are not required.
Navigate to linux clang repo
Find the entry with the label “latest” in the “Instances” list. Click on it.
Take note of the “SHA256” field, something like 52c90bdf7a7bdc1352dd0de93ceea53a260b391a3d1e81ca20c909a60686753c
Take note of the “version” field, something like git_revision:c9e46219f38da5c3fbfe41012173dc893516826e
Navigate to Mac clang repo
find the entry with the label “latest” in the “Instances” list
Ensure that the “version” field is identical to the Linux version you found above. If they are different, go back to the “Instances” list and find one version that has both Mac and Linux instances.
Take note of the “SHA256” field
Open the WORKSPACE.bazel file
Update the fuchsia_clang_repository
rule accordingly:
version
should be pasted in cipd_tag
SHA256
for Linux should be pasted in linux
SHA256
for Mac should be pasted in mac
Follow the instructions in the After a version update section
When to update: Frequent updates are not required.
Checkout the googletest repository in a separate location.
Checkout the proper branch: git switch sandbox/fuchsia_bazel_sdk
Cherry-pick changes from the main branch, or make new changes, get them merged in the fuchsia_bazel_sdk
branch.
Clean the Bazel cache: bazel clean --expunge
Follow the instructions in the README to validate if the samples build and run
Send a CL and request review from one of the owners of the repository.