GitHub published a snapshot of all the public open-source repositories to BigQuery and Francesc used it to draw some cool statistics about Go projects.

I used the same dataset to analyze how the Go ecosystem does vendoring. Disclosure: there's some ego stroking here, as I'm the author of gvt. (Try it! It's meant to be as easy and idiomatic as possible.)

First, I extracted the subset of Go repositories. Then, I used filepath patterns to figure out what vendoring tool they used and wether they checked in the source of the dependencies. Finally, I sorted the tools by popularity by adding together the stars of each repository using them (from the GitHubArchive dataset).

Note: the dataset includes only public GitHub repositories with a LICENSE, and seems to be one or two months old.

Here are the results:

Tool Repositories Checking source in Total stars Godeps vendor 604 378 62.58% 76312 Glide 370 64 17.30% 67618 Godeps _workspace 1204 1149 95.43% 53263 govendor 205 193 94.15% 47097 gvt 101 87 86.14% 22331 gb 135 102 75.56% 3722 None of the above 305 - - 42883 Total 2924 2278 77.91%

I'm happy to see that checking source in is an established practice (since it makes build reproducible and packages go-get-able) with 78% projects adopting it.

Below are some popular projects using each tool. (You can find the entire lists here.)

Funnily enough, the most popular gb project is my whosthere, but no public project of mine used gvt at the time of the snapshot. (All my private and CloudFlare ones do!) On the other hand, 10% of the gvt projects are by @jessfraz.

Figuring out what the median number of vendored dependencies is and what the most popular ones are is... left as an exercise to the reader.

All the queries used for this article are here.

For more random Go statistics, follow me on Twitter.

gvt

Godeps (vendor style)

Godeps (_workspace style)

Glide

govendor

gb

Custom