Skip to content
This repository was archived by the owner on Sep 15, 2022. It is now read-only.

Dart Roll

Søren Gjesse edited this page Sep 21, 2015 · 14 revisions

How to update (roll) the Dart sdk dependency

Ultra short version is:

Checkout this branch:

https://github.com/dart-lang/sdk/tree/_temporary_fletch_patches

Identify the commit on the master branch you want, often just:

git rev-parse origin/master

Merge this commit into _temporary_fletch_patches using --no-edit:

git merge -X theirs --no-commit COMMIT_ID

Make the diff empty:

git checkout COMMIT_ID -- .

Verify that the diff is empty:

git diff COMMIT_ID

If it is not empty, make it empty.

Commit the merge:

git commit --no-edit

Identify the patches needed

Use this command to find the last merge:

$ git log --oneline --merges origin/master.._temporary_fletch_patches

This will produce output like this:

e4f708a Merge commit 'f4075e6bad47da89433eac6bfbed444cc5f926a4' into _temporary_fletch_patches
5972121 Merge commit '253ffeed4a7e27a4085f63aa6d60e8c19f3454d5' into _temporary_fletch_patches
1170e81 Merge commit '9f00e0591816edd4cca0cf349e87b7b4f82cd2e6' into _temporary_fletch_patches
23736d3 Version 1.11.0-dev.5.2
01a361f Version 1.11.0-dev.5.0
c8d21bc Version 1.11.0-dev.4.0
6072062 Version 1.11.0-dev.3.0

The first line is the merge that was the basis for our last Dart roll, that is, e4f708a. Let's remember that revision (and confirm it):

$ git tag last_dart_roll e4f708a
$ git rev-parse --short last_dart_roll
e4f708a

We can now produce a list of changes that needs to be cherry picked:

$ git log --oneline last_dart_roll..origin/_temporary_fletch_patches
822ff59 Add fletch to task_kill.py
c619107 Shorten and prettify build bot information.
92e3e0d Update download link to use 'proper' URL.
2cb8330 Use correct syntax for STEP_LINK command.
d2c9cd8 Map 'mac' to 'macos'.
14b5d3d Start auto-uploading binaries for the Dart VM to GCS.
257523b First version of the bot script for building the Dart SDK with Fletch-specific patches.
0c39c78 Use vfork instead of fork on Linux.
1c621f6 Unix Domain Sockets
d4f3a89 Remove WATCHLISTS.

We need to apply these revisions reversed, but "Remove WATCHLISTS." is likely to cause a conflict, so we'll handle that first:

$ git cherry-pick d4f3a89

If there's a conflict, just remove the file and commit the result:

$ git rm -f WATCHLISTS
$ git commit --no-edit

You need the rest of the commits in reverse order:

$ git log --oneline last_dart_roll..origin/_temporary_fletch_patches | tail -r | tail +2
1c621f6 Unix Domain Sockets
0c39c78 Use vfork instead of fork on Linux.
257523b First version of the bot script for building the Dart SDK with Fletch-specific patches.
14b5d3d Start auto-uploading binaries for the Dart VM to GCS.
d2c9cd8 Map 'mac' to 'macos'.
2cb8330 Use correct syntax for STEP_LINK command.
92e3e0d Update download link to use 'proper' URL.
c619107 Shorten and prettify build bot information.
822ff59 Add fletch to task_kill.py

It's best to save the list of commits in a file rather than having two git commands in a pipeline as they both may attempt to get a lock on the repository. So let's say we stored the above commits in a file named changes.txt, and edited it to remove any we don't want. We can now run cherry-pick:

$ cut -d' '  -f1 changes.txt | xargs git cherry-pick
[_temporary_fletch_patches 548b92f] Use vfork instead of fork on Linux.
 Date: Thu Jun 18 13:14:37 2015 +0200
 1 file changed, 50 insertions(+), 59 deletions(-)
[_temporary_fletch_patches 40fee5a] First version of the bot script for building the Dart SDK with Fletch-specific patches.
 Author: Kasper Lund 
 Date: Fri Jul 3 11:08:23 2015 +0200
 1 file changed, 46 insertions(+)
 create mode 100644 tools/bots/sdk_fletch_patched.py
[_temporary_fletch_patches 052f3f4] Start auto-uploading binaries for the Dart VM to GCS.
 Author: Kasper Lund 
 Date: Fri Jul 3 13:04:19 2015 +0200
 1 file changed, 17 insertions(+), 8 deletions(-)
[_temporary_fletch_patches 1f13cb8] Map 'mac' to 'macos'.
 Author: Kasper Lund 
 Date: Fri Jul 3 13:39:14 2015 +0200
 1 file changed, 11 insertions(+), 10 deletions(-)
[_temporary_fletch_patches 6afc972] Use correct syntax for STEP_LINK command.
 Author: Kasper Lund 
 Date: Fri Jul 3 14:26:16 2015 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
[_temporary_fletch_patches 0777e44] Update download link to use 'proper' URL.
 Author: Kasper Lund 
 Date: Fri Jul 3 14:33:00 2015 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
[_temporary_fletch_patches 715e3d1] Shorten and prettify build bot information.
 Author: Kasper Lund 
 Date: Fri Jul 3 14:44:09 2015 +0200
 1 file changed, 2 insertions(+), 2 deletions(-)
[_temporary_fletch_patches 5020b4b] Add fletch to task_kill.py
 Date: Thu Aug 13 16:19:05 2015 +0200
 1 file changed, 18 insertions(+), 3 deletions(-)

In the above example I removed 1c621f6 because I'm testing out a new version of that patch.

Push the changes

git push origin _temporary_fletch_patches

Clone this wiki locally