Updating dependencies

This repository contains a few external dependencies:

  • Fuchsia Bazel SDK
  • Fuchsia Core SDK
  • Clang
  • Google Testing and Mocking Framework

This document provides simple instructions on how to update these dependencies to newer versions.

How to update - easy version

There is an update script the performs all the manual steps below and sends a CL. Please use it and report if you encounter any error.

cd `mktemp -d`
curl -s https://fuchsia.googlesource.com/sdk-integration/+/refs/heads/main/scripts/upgrade_repo.sh?format=TEXT  |
    base64 --decode > upgrade_repo.sh &&
    source ./upgrade_repo.sh drivers

How to update

If for some reason the script above doesn't work as expected, the manual instructions can be followed.

Fuchsia Bazel SDK (sdk-integration)

When to update: As frequent as possible, ideally daily.

The Fuchsia Bazel SDK is added to this repo as a git submodule. In order to update it, use the following git commands:

  • git -C third_party/sdk-integration pull

  • git add third_party/sdk-integration && git commit && git push origin:HEAD

Get the CL reviewed and merged.

Fuchsia Core SDK

When to update: As frequent as possible, ideally daily.

  • 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

  • Repeat the steps above for the Linux experimental repo and Mac experimental repo

  • Open the WORKSPACE.bazel file

  • Update the fuchsia_sdk_repository rule accordingly:

    • The version should be pasted in cipd_tag
    • The SHA256 for Linux core should be pasted in linux
    • The SHA256 for Mac core should be pasted in mac
    • The SHA256 for Linux experimental should be pasted in linux_experimental
    • The SHA256 for Mac experimental should be pasted in mac_experimental
  • Follow the instructions in the After a version update section

Clang

Follow the corresponding instructions in the getting started repository.

Google Testing and Mocking Framework

Follow the corresponding instructions in the getting started repository.

After a version update

  • 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