Skip to content

Instantly share code, notes, and snippets.

@munificent
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save munificent/a56a70c7d5387f65cb8f to your computer and use it in GitHub Desktop.

Select an option

Save munificent/a56a70c7d5387f65cb8f to your computer and use it in GitHub Desktop.
How to bump the async_await compiler in the Dart repo

Scenario: Kevin and Erik or some other fine contributor to the async_await package on GitHub has committed some changes and you want to use those within the main Dart repo.

About you:

  • You already have the repo downloaded locally on your machine.
  • You are using Git, not svn. You also probably ride a horseless carriage and no longer use leeches and bloodletting to cure your ailments.

Note that you do not need a separate svn checkout. You already have one, you just don't know it.

Given that, here's the process. This likely alsos work for other third party packages that live on GitHub that we want to use in the Dart repo, but I make no promises there:

  1. Look up the SHA-1 of the commit you want. It's usually just "latest commit" on the main page for the repo.

  2. Go into the directory where the deps live:

    # Assuming cwd is the normal "dart" directory in the repo.
    $ cd ../all.deps
    
  3. Open the DEPS file, and change the value of "async_await_rev" to the new commit. It looks something like:

    "async_await_rev" : "@<your commit here>",
  4. Save that file. In a separate shell whose cwd is the usual dart directory in the repo, pull in the change by running:

    $ gclient sync

    You may also want to run gclient runhooks if you're feeling superstitious. Look in third_party/pkg/async_await and verify that the new changes are in there.

  5. Test it locally. Run pub's shell script from the repo. Run some tests. Reach your happy place.

  6. Commit it in svn and upload it. Back in the all.deps directory run:

    $ gcl change bump_async
    # Enter a description and save.
    $ gcl upload bump_async
  7. Send it out for code review. gcl upload will print a code review URL. Go through your usual review process until you get an LGTM.

  8. Commit the DEPS patch. Again, from all.deps/:

    $ gcl commit bump_async
  9. Commit the compiler version bump patch. Now, from the main dart directory, go through the normal code review process to submit your change to COMPILER_VERSION.

  10. Make sure the bots are happy. Wait for that sweet sweet green to appear on the waterfall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment