go1.11 will soon be required

18 views
Skip to first unread message

Nikhil Benesch

unread,
Sep 13, 2018, 4:56:00 PM9/13/18
to cockroach-db
I'm planning to bump our minimum required version of Go to v1.11 on Monday morning (9/17). Please upgrade before then!

Both master and release-2.1 are compatible with go1.11, and few engineers (if not most engineers) have successfully been running go1.11 on macOS and Linux for several days.

Note that go1.11 ships with a gofmt that has a different heuristic for struct alignment. If your editor is configured to run gofmt automatically, you're liable to create diffs like this:

diff --git a/pkg/server/updates_test.go b/pkg/server/updates_test.go
index 8bf99e49a8..540389db30 100644
--- a/pkg/server/updates_test.go
+++ b/pkg/server/updates_test.go
@@ -521,8 +521,8 @@ func TestReportUsage(t *testing.T) {
  pgerror.CodeSyntaxError:              10,
  pgerror.CodeFeatureNotSupportedError: 30,
  pgerror.CodeDivisionByZeroError:      20,
- "blah":        10,
- "builtins.go": 10,
+ "blah":                               10,
+ "builtins.go":                        10,
  } {
  if actual := r.last.ErrorCounts[code]; expected != actual {
  t.Fatalf(

CI will unfortunately reject these diffs, since it's still configured to verify go1.10 style. Once we bump the minimum to go1.11 on Monday, we'll reformat everything to go1.11 style, and these diffs and CI failures will stop.

In the meantime, you can configure your editor to use bin/gofmt, which will always format using the style that CI expects, instead of the gofmt that ships with your Go distribution. bin/goimports has been given the same treatment.

Please chime in on #30035 with any questions or concerns.

Cheers,
Nikhil

Nikhil Benesch

unread,
Sep 17, 2018, 7:50:43 AM9/17/18
to cockroach-db
Reminder: today's the day! Please upgrade to go1.11 if you haven't already.

Nikhil Benesch

unread,
Sep 17, 2018, 9:27:52 PM9/17/18
to cockroach-db
If you haven't heard already, we've reverted the bump due to what seems to be a bug in the go1.11 race detector on at least linux/amd64. If you continue to use go1.11 in your local development environment, just expect with the occasional segfault when running with the race detector enabled. Note that so far macOS does not seem to be affected.
Reply all
Reply to author
Forward
0 new messages