Flutter and many of its dependencies are pinned in Fuchsia. This file contains instructions for updating Fuchsia‘s version of Flutter and its dependencies. The full procedure is often not required to build a stable system. However, following these instructions will result in a version of Flutter and its dependencies in Fuchsia that has been built and tested by the Flutter and Dart teams’ CI.
Updating Fuchsia's version of Flutter requires updating its dependencies. There are three main components:
Ocassionally, it is necessary to first update the version of the Dart VM used by the Flutter engine outside of Fuchsia. Instructions for updating the Dart VM in the Flutter engine are here.
Updating the version of the Flutter engine used by the Flutter framework outside of Fuchsia is sometimes needed to trigger Flutter's CI on a more recent version of the Flutter engine. Instructions for updating the Flutter engine in the Flutter framework are here.
To roll Flutter forward:
$ git checkout -b roll-flutter-triforce origin/master
flutter
manifest file in this directory.flutter
manifest file in this directory.dart_revision
and write its hash into the dart
manifest file in this directory.$ git commit -a -m "[flutter] Rolls the Flutter triforce forward"
$ jiri update -gc --local-manifest=true
First, update the Dart packages needed to build the Dart SDK:
$ cd third_party/dart $ ./tools/create_pkg_manifest.py -d DEPS -o ../../topaz/manifest/dart_third_party_pkg $ ./tools/create_pkg_manifest.py -d DEPS -o ../../topaz/manifest/dart_third_party_pkg_head $ cd ../../topaz $ git commit -a --amend $ cd ..
$ jiri update -gc --local-manifest=true
Second, update the Dart packages needed by the Flutter framework:
$ ./scripts/dart/update_3p_packages.pyDart's pub tool will run and update the Dart package sources under
//third_party/dart-pkg/pub
$ cd third_party/dart-pkg/pub $ git checkout -b update-3p-pkg origin/master $ git commit -a -m "[dart] Update third_party packages"
Build and test the debug build:
$ fx set x86 --goma && fx full-build && fx reboot && fx boot -1
Build and test the release build:
$ fx set x86 --goma --release && fx full-build && fx reboot && fx boot -1
To test the builds:
If any of these checks fails, do not continue with the roll. Stop and investigate.
Create a CL for updating the topaz manifests
$ cd topaz $ git push origin HEAD:refs/for/master
Land this CL first.
Then, create a CL for updating //third_party/dart-pkg/pub
$ cd third_party/dart-pkg/pub $ git push origin HEAD:refs/for/master
Land this CL second.
If a change to a layer below Topaz will break the Dart VM or the Flutter engine, if at all possible land the updates the the Dart VM and/or the Flutter engine first. Then, land the breaking changes in the lower layers. This will block the auto-rollers. Unblock the auto-rollers by landing a manual roll of the lower layers along with the CL that udpates the Flutter triforce in the Topaz layer.