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/ast/astutil : Unparen bad use of go/ast Unparen #69361

Closed
Giulianos opened this issue Sep 9, 2024 · 1 comment
Closed

x/tools/go/ast/astutil : Unparen bad use of go/ast Unparen #69361

Giulianos opened this issue Sep 9, 2024 · 1 comment
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@Giulianos
Copy link

Go version

1.22.5

Output of go env in your module/workspace:

GO111MODULE='on'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/gscaglioni/Library/Caches/go-build'
GOENV='/Users/gscaglioni/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/gscaglioni/go/pkg/mod'
GONOPROXY='github.asapp.dev/*,github.com/asappinc/*'
GONOSUMDB='github.asapp.dev/*,github.com/asappinc/*'
GOOS='darwin'
GOPATH='/Users/gscaglioni/go'
GOPRIVATE='github.asapp.dev/*,github.com/asappinc/*'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.5'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/gscaglioni/git/asapp/protobuf/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/5l/mkbf31ss7kgb5gnlh4nfhc6h0000gn/T/go-build4286188762=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

Execute a program that uses golang.org/x/tools/go/ast/astutil.

What did you see happen?

The following error:
golang.org/x/tools/go/ast/astutil/util.go:11:48: undefined: ast.Unparen

What did you expect to see?

To work properly. Actually I inspected last changes to Unparen function and I see that it was deprecated in cl/612038 using go/ast implementation. I didn't put too much time investigating this, but I think it should be something like this:

func Unparen(e ast.Expr) ast.Expr { return e.Unparen() }
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 9, 2024
@gopherbot gopherbot added this to the Unreleased milestone Sep 9, 2024
@gabyhelp
Copy link

gabyhelp commented Sep 9, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants