PSA: Major change in how dependencies are synced with gclient

10 views
Skip to first unread message

Henrik Kjellander

unread,
Feb 4, 2017, 5:25:27 AM2/4/17
to discuss-libyuv
TL:DR; libyuv checkouts no longer includes a full Chromium copy, saving ~9GB of download and disk space. 

Ever since we moved from Subversion to Git for libyuv, we've been forced to download a copy of Chromium in order to be able to build using the Chromium toolchain. 

Luckily, there's a way to use DEPS files now (similar to WebRTC) and it has now been deployed with f49fde796febead2ab00511735595d3b94ca6de8.
Now there's no longer any Chromium checkout in your repo (or any sync_chromium.py or setup_links.py file). All external dependencies are now synced the traditional way using the DEPS file.

Too good to be true?
Well, yes... We're still checking out parts of Chromium, namely so called "Git subtree mirrors" of a couple of directories:
  • base (75MB) - only to be used by Android unit tests (and the libevent dependency)
  • build (34MB) - contains most of the build toolchain.
  • testing (27MB) - test-related scripts
  • third_party (3.2GB) - lots of third_party code and foremost the BUILD.gn files for all. This is the obvious next-step to look at.
  • tools (123MB) - tools required for build and development.
These are synced down similar to regular dependencies defined in the DEPS file. They're auto-rolled similar to what we used to to with the chromium_revision using a script.
The tools directory here is also the reason why there's a new tools_libyuv directory introduced recently, to contain our own tools (to avoid colliding with Chromium's tools).

What's the downside?
Unfortunately we'll get many new directories in tools/ and third_party/ that are not very relevant to libyuv development. We'll have to live with that for now until somebody untangles every dependency into these directories and either sets up Git mirrors for each one of them or is signing up on maintaining copies of them (that we could host in our own repo).

What do I need to do?
When you've synced past f49fde796febead2ab00511735595d3b94ca6de8, the src/chromium dir will show up as unversioned in your checkout. Just delete it and reclaim that large amount of disk space (I've seen that Git repo grow to >100GB over time).
You might also get some stuff moved into a  _bad_scm directory in the checkout root. That can also be deleted to reclaim more space.

Questions? Problems? 
I hope this migration will be reasonably painless, but if you get syncing errors like:

Syncing projects: 100% (45/45) src/third_party/robolectric/robolectric   

src/third_party/android_tools/ndk (ERROR)
----------------------------------------
[0:00:23] Started.
----------------------------------------
Error: 45> 
45> ____ src/third_party/android_tools/ndk at 26d93ec07f3ce2ec2cdfeae1b21ee6f12ff868d8
45>  You have unstaged changes.
45>  Please commit, stash, or reset.

for this or other directories configured in the DEPS file, please just delete these directories and retry the sync.

Don't hesitate to reply to this thread or reach out to me directly if you have issues.
Reply all
Reply to author
Forward
0 new messages