blob: 494a0f3d34d1805d2db8bf09f3b77416095b1c13 [file] [log] [blame]
The State of Go
Where we are in February 2015
Andrew Gerrand
adg@golang.org
* 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.
.link /doc/go1.4 go.dev/doc/go1.4
* Transition to Git
* 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.
.link https://go.googlesource.com
.link https://go-review.googlesource.com
.link https://github.com/golang/go
* 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.
* 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.
* 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).
- 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.
* Go 1.5
* 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.)
* 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:
.link /s/go13compiler go.dev/s/go13compiler
Go 1.5 will have *no* C code in the tool chain or runtime.
* 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:
.link /s/go15bootstrap go.dev/s/go15bootstrap
If you use a binary distribution of Go, you don't need to do anything.
* 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.
.link /s/go14gc go.dev/s/go14gc
* 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:
.link https://github.com/bradfitz/http2
See it in action:
.link https://http2.golang.org
* 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.)
* 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:
.link https://github.com/4ad/go
* Execution tracing
Dmitry Vyukov has implemented a `trace` tool.
It collects data to produce diagrams of process execution.
.image state-of-go/trace.png 350 _
Front end is the Android/Chrome trace-viewer. ([[https://github.com/google/trace-viewer][github.com/google/trace-viewer]])
.link /s/go15trace go.dev/s/go15trace
* 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.
- `gomvpkg`: 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.
* 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)
* The Go Community
* 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.
* Gopher Gala
A global Go hackathon, in January 2015 (last week).
.image state-of-go/gala.jpg 200 _
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 [[http://gophergala.com/blog/gopher/gala/2015/02/03/winners/][winners have been announced]].
* Go user groups
Lots of Go meetups popping up all over the world.
Find one near you:
.link https://go-meetups.appspot.com