Skip to content

golang.org/dl/gotip: command should override GOROOT with its tip packages location #35577

@lggomez

Description

@lggomez

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

$ go version
1.13.4

Does this issue reproduce with the latest release?

Yes

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

go env
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build255297653=/tmp/go-build -gno-record-gcc-switches"

What did you do?

While verifying an issue fix from tip (#34123), I built the affected repro case I have using gotip run main.go

What did you expect to see?

I expected the compiled app to use the runtime packages downloaded by it

What did you see instead?

The app was still being built using the local GOROOT packages. I had to override GOROOT manually to achieve that end: GOROOT=~/sdk/gotip gotip run main.go

Since the purpose of gotip is to serve as a downloader and nightly version of Go it could be more consistent from an usability standpoint for it to use its packages by default (although I guess that this would be a breaking change because all users of this all are already used to this behavior)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions