Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/playground: upgrade to 1.12 #30397

Closed
iporsut opened this issue Feb 26, 2019 · 5 comments
Closed

x/playground: upgrade to 1.12 #30397

iporsut opened this issue Feb 26, 2019 · 5 comments

Comments

@iporsut
Copy link
Contributor

iporsut commented Feb 26, 2019

What version of Go are you using (go version)?

$ go version
go version go1.12 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN="/Users/weerasak/go/bin"
GOCACHE="/Users/weerasak/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/weerasak/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/9k/pvfwqqzn6fqbpwghhrcjkm480000gn/T/go-build282905208=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I run godoc -play that distributed with go 1.12 then open http://localhost:6060/pkg/strings/#ReplaceAll and run example.

What did you expect to see?

moo moo moo

What did you see instead?

prog.go:9:14: undefined: strings.ReplaceAll
@iporsut
Copy link
Contributor Author

iporsut commented Feb 26, 2019

The root cause because godoc sending example code to compile at https://play.golang.org/compile that still use v1.11.1.

@agnivade agnivade changed the title cmd/godoc: cannot run strings#ReplaceAll example x/playground: upgrade to 1.12 Feb 26, 2019
@gopherbot gopherbot added this to the Unreleased milestone Feb 26, 2019
@agnivade
Copy link
Contributor

/cc @dmitshur

@agnivade agnivade changed the title x/playground: upgrade to 1.12 x/tools/playground: upgrade to 1.12 Feb 26, 2019
@dmitshur dmitshur self-assigned this Feb 26, 2019
@dmitshur
Copy link
Contributor

Indeed, the playground is still on Go 1.11.1, as https://play.golang.org/p/Ztyu2FJaajl reports.

I'll redeploy it with Go 1.12 now.

@dmitshur dmitshur changed the title x/tools/playground: upgrade to 1.12 x/playground: upgrade to 1.12 Feb 26, 2019
@iporsut
Copy link
Contributor Author

iporsut commented Feb 26, 2019

I'v checked https://play.golang.org/p/Ztyu2FJaajl it 1.12 now thanks.

@iporsut iporsut closed this as completed Feb 26, 2019
@gopherbot
Copy link

Change https://golang.org/cl/163798 mentions this issue: playground: use Go 1.12

gopherbot pushed a commit to golang/playground that referenced this issue Feb 26, 2019
Go 1.12 has been released¹ and should be used, so that it's possible
to play with Go programs that rely on Go 1.12-only features.

In Go 1.12, build cache is required. Either GOCACHE must be set,
or HOME must be set so that GOCACHE can be implicitly deduced.
Set HOME and pass it on to the go build invocation inside the
compileAndRun function.

This fixes the following error, detected by the playground test:

	2019/02/26 06:28:44 compile error: build cache is required, but could not
	be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME
	are defined
	The command '/bin/sh -c /app/playground test' returned a non-zero code: 1

This is related to issues golang/go#29243 and golang/go#29251,
and the fix in CL 154181.

¹ https://groups.google.com/d/msg/golang-announce/Y1RZqnCKUKY/N9yK5c8iBgAJ

Fixes golang/go#30397

Change-Id: I44c5c8928060732f31fd935b114568258c7298c7
Reviewed-on: https://go-review.googlesource.com/c/163798
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@golang golang locked and limited conversation to collaborators Feb 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants