The State of Go Where we are in February 2015 Andrew Gerrand

Go 1.4 Released in December 2014. A few important things: Android support.

Canonical import paths.

The go generate command. Lots of behind-the-scenes work: Prep work for new garbage collector.

Prep work for C to Go tool chain conversion.

Source tree re-organization. golang.org/doc/go1.4 2

Transition to Git 3

Transition to Git In December we migrated the Go repositories from Mercurial to Git. Also moved to new development infrastructure: googlesource.com replaces Google Code for repository hosting.

Gerrit replaces Rietveld for code review.

GitHub replaces Google Code for issue tracking and wiki. A big deal for Go contributors, but not important to Go users. go.googlesource.com go-review.googlesource.com github.com/golang/go 4

Why Git? Gerrit and GitHub use Git. Why Gerrit? Rietveld was unmaintained.

Gerrit is actively maintained; used by Android and Chrome, among others. Why GitHub? Puts us closer to our community.

Other GitHub repos can more easily link to Go issues and commits. 5

Transition pros and cons Pros: More people understand Git than Mercurial.

Contributors can use their own Git workflows.

Good integration between Git and Gerrit. (Rietveld and Mercurial are separate.)

Automated CLA checking. Cons: Git has a steep learning curve.

No way to disable pull requests.

No way to "star" or +1 issues.

The standard of issue reports has gone down. (No issue templates. Different culture.)

The transition was a ton of work. 6

Why not accept pull requests? Coming from Gerrit, Rietveld, or Google's internal code review systems,

GitHub's pull request system is lacking. Can only view diffs on a single page (can be very slow).

slow). Comments are sent as they are written; you cannot "draft" comments.

Cannot compare differences between patch sets.

To create a patch one must fork the repository publicly (weird and unnecessary).

Accepting a patch creates a "merge commit" (ugly repo history).

In general, pull request culture is not about code review. 7

Go 1.5 8

Change to release cycle Go 1.5 is scheduled for release in August 2015 (was June). (Previous cycle clashed with holidays and other calendrical events.) 9

From C to Go The gc tool chain is being converted from C to Go. An ongoing process, started early 2014.

Russ Cox says "It'll be done by March [2015]." New link tool to replace 6l , 8l , etc.

New asm tool to replace 6a , 8a , etc.

Machine-translated gc to replace 6g , 8g , etc. Design doc: golang.org/s/go13compiler Go 1.5 will have no C code in the tool chain or runtime. 10

Compiling Go 1.5 You will need Go 1.4 to build Go 1.5 and above. (But you will not need a C compiler!) As a user, put Go 1.4 in $HOME/go1.4 (or set $GOROOT_BOOTSTRAP ). New OS or architecture ports will need to cross-compile. Design doc: golang.org/s/go15bootstrap If you use a binary distribution of Go, you don't need to do anything. 11

Concurrent Garbage Collector Work began on a new, concurrent GC during the Go 1.4 dev cycle. Goal: Limit GC latency to less than 10 milliseconds.

Run Go application code for at least 40ms out of every 50ms. On track for Go 1.5. golang.org/s/go14gc 12

HTTP/2 Brad Fitzpatrick has implemented an HTTP/2 server for Go. Will be in the standard library by Go 1.soon. Go servers that use net/http will get HTTP/2 for free. Currently in Brad's GitHub: github.com/bradfitz/http2 See it in action: http2.golang.org 13

Mobile David Crawshaw, Hana Kim, Minux, and Burcu Dogan have been working on Go for

mobile devices. Can build Android apps with Go 1.4

(if you can work out the Android build system). For Go 1.5: Simpler build story for Android.

More NDK library support.

Better bindings for calling Go from Java.

Beginnings of iOS support. (New darwin/arm build target.) 14

New architectures Go 1.5 will support PowerPC 64 and (maybe) ARM64. PowerPC 64 is basically done; builder running, passes tests. ARM64 development ongoing.

Hope to have a dev.arm64 branch in the main repo for Go 1.5.

Stretch goal is merging it into master. See work in progress for ARM64 here: github.com/4ad/go 15

Execution tracing Dmitry Vyukov has implemented a trace tool.

It collects data to produce diagrams of process execution. Front end is the Android/Chrome trace-viewer. (github.com/google/trace-viewer) golang.org/s/go15trace 16

Analysis and Refactoring Tools Alan Donovan and others have been working on a tools for analyzing and

manipulating Go source code. Available in the tools repo: callgraph : display the call graph of a Go program.

: display the call graph of a Go program. gomvpkg : moves go packages, updating import declarations.

: moves go packages, updating import declarations. gorename : type-safe renaming of identifiers in Go source code. Coming soon: sockdrawer : a tool for automatically splitting packages. 17

Builder infrastructure Brad Fitzpatrick and Andrew Gerrand have been hacking away at our continuous

build infrastructure. Now running Linux, FreeBSD, OpenBSD, and Plan 9 builders

on Google Compute Engine. (OS X, Windows coming soon.) Spin up builders to do work, spin up many in parallel.

Gives us results much faster. Up next: trybots to test pending changes. Also: gomote! (Demo) 18

The Go Community 19

Conferences in 2015 FOSDEM, Brussels, now!

GopherCon India, Bengaluru, February

GoCon, Tokyo, Spring and Autumn

GopherCon, Denver, July

dotGo, Paris, November More to be announced. 20

Gopher Gala A global Go hackathon, in January 2015 (last week). Teams compete to produce Go apps, judged by "usefulness, creativity, completeness, and how well they showcase Go's strengths." Also physical hackathons around the world: from San Francisco to Stockholm to Tokyo. Cool prizes, including a Chromebook Pixel, a Raspberry Pi, and a trip to Colima, Mexico. The winners have been announced. 21

Go user groups Lots of Go meetups popping up all over the world. Find one near you: go-meetups.appspot.com 22