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/gopls: unnamed generics parameter formatted to be unparened and named in go2go #40681

Open
tamayika opened this issue Aug 11, 2020 · 1 comment
Labels

Comments

@tamayika
Copy link

@tamayika tamayika commented Aug 11, 2020

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

$ go version
go version devel +ead7e9b351 Sat Aug 1 05:14:38 2020 +0000 linux/amd64
$ gopls version
golang.org/x/tools/gopls master
    golang.org/x/tools/gopls@v0.0.0-20200616205136-76e917206452 h1:0SxHeccMdwJg02GN5PuFGSus9SSmA6FFOpuyRTnjrac=

Does this issue reproduce with the latest release?

No(go2go development)

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/owner/.cache/go-build"
GOENV="/home/owner/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/owner/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/owner/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/owner/go2"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/owner/go2/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-build789186970=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Save and format below file in VSCode. (I followed installation here)

package main

type iface(type T) interface {
}

type some(type T) struct {
	f func(T, iface(T))
}

What did you expect to see?

package main

type iface(type T) interface {
}

type some(type T) struct {
	f func(T, iface(T))
}

What did you see instead?

package main

type iface(type T) interface {
}

type some(type T) struct {
	f func(T, iface T)
}
@gopherbot gopherbot added this to the Unreleased milestone Aug 11, 2020
@tamayika tamayika changed the title x/tools/gopls: unnamed generics parameter formatted to be unparened in go2go x/tools/gopls: unnamed generics parameter formatted to be unparened and named in go2go Aug 11, 2020
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Aug 11, 2020

Thank you for raising this issue. However it's unlikely that it will be resolved in the near future. gofmt has not been updated to work with the generics prototype, and it's unlikely it will be until after (and if) that proposal is accepted.

@stamblerre stamblerre removed this from the Unreleased milestone Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.