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/tools/go/packages: New version of go-tools doesn't support go1.10 #32575

Closed
spellr opened this issue Jun 12, 2019 · 1 comment
Closed

x/tools/go/packages: New version of go-tools doesn't support go1.10 #32575

spellr opened this issue Jun 12, 2019 · 1 comment

Comments

@spellr
Copy link

spellr commented Jun 12, 2019

x/tools/go/packages is using -compiled flags when running go list, a flag that's not supported in go1.10

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

$ go version
go version go1.10 linux/amd64

Does this issue reproduce with the latest release?

no

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/tmp/.gocache"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build297327963=/tmp/go-build -gno-record-gcc-switches"

What did you do?

  1. Install go1.10
  2. go get -u golang.org/x/tools/...
  3. go run main.go
    main.go:
package main

import (
        "fmt"
        "golang.org/x/tools/go/packages"
)

func main() {
        var conf packages.Config
        _, err := packages.Load(&conf, "file=main.go")
        if err != nil {
                fmt.Println(err)
        }
}

What did you expect to see?

no output

What did you see instead?

bash-4.2$ go run main.go 
unsupported version of go: exit status 2: flag provided but not defined: -compiled
usage: list [-e] [-f format] [-json] [build flags] [packages]
Run 'go help list' for details.
@gopherbot gopherbot added this to the Unreleased milestone Jun 12, 2019
@matloob
Copy link
Contributor

matloob commented Jun 13, 2019

Hello, we have a policy of only supporting the current and previous Go releases. As of today, that's Go 1.12 and Go 1.11. So this is "working as intended".

Hopefully you're able to work around this by using an older version of tools, or a newer version of Go.

Thanks!
Michael

@matloob matloob closed this as completed Jun 13, 2019
@golang golang locked and limited conversation to collaborators Jun 12, 2020
@rsc rsc unassigned matloob Jun 23, 2022
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

3 participants