Vim-go: GoRename broken after upgrading to Go 1.11

Created on 3 Sep 2018  Â·  3Comments  Â·  Source: fatih/vim-go

What did you do? (required. The issue will be closed when not provided.)

Open a .go file in MacVim. Put cursor on a name and do :GoRename.

What did you expect to happen?

Rename all within appropriate scope (as it did with Go 1.10)

What happened instead?

A crash (within go rename, not vim). The buffer being edited is backgrounded and a buffer containing /usr/local/go/src/internal/cpu/cpu_x86.go is opened in front. A secondary pane shows a list of errors:

/usr/local/go/src/internal/cpu/cpu_x86.go|9| 7: CacheLineSize redeclared in this block
/usr/local/go/src/internal/cpu/cpu_wasm.go|7| 7:    other declaration of CacheLineSize
/usr/local/go/src/runtime/internal/sys/arch_wasm.go|8| 2: ArchFamily redeclared in this block
/usr/local/go/src/runtime/internal/sys/arch_amd64.go|8| 2:  other declaration of ArchFamily
/usr/local/go/src/runtime/internal/sys/arch_wasm.go|9| 2: BigEndian redeclared in this block
/usr/local/go/src/runtime/internal/sys/arch_amd64.go|9| 2:  other declaration of BigEndian
/usr/local/go/src/runtime/internal/sys/arch_wasm.go|10| 2: CacheLineSize redeclared in this block
/usr/local/go/src/runtime/internal/sys/arch_amd64.go|10| 2:     other declaration of CacheLineSize
/usr/local/go/src/runtime/internal/sys/arch_wasm.go|11| 2: DefaultPhysPageSize redeclared in this block
/usr/local/go/src/runtime/internal/sys/arch_amd64.go|11| 2:     other declaration of DefaultPhysPageSize 

...

Configuration (MUST fill this out):

  • vim-go version: V1.17

  • vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):
    My vimrc only references vim-go indirectly via call pathogen#infect()

  • Vim version (first three lines from :version):

VIM - Vi IMproved 8.1 (2018 May 18, compiled Aug 14 2018 05:28:49)
macOS version
Included patches: 1-280
  • Go version (go version):
    go version go1.11 darwin/amd64
  • Go environment (go env):
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/mellis/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/mellis/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/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/c9/14hfkbjx7jn47w0381_5qqf40000gn/T/go-build046221807=/tmp/go-build -gno-record-gcc-switches -fno-common"

Most helpful comment

Solved. I just needed to re-get gorename and re-build. Passes all tests and seems to work correctly again in vim-go.

BTW, thanks for creating and maintaining this incredibly useful vim extension.

All 3 comments

Solved. I just needed to re-get gorename and re-build. Passes all tests and seems to work correctly again in vim-go.

BTW, thanks for creating and maintaining this incredibly useful vim extension.

BTW, handy command to update all needed programs (including gorename): :GoUpdateBinaries

Thanks svko. That's very helpful.

On Sat, Aug 17, 2019 at 4:43 PM svko notifications@github.com wrote:

BTW, handy command to update all needed programs (including gorename):
:GoUpdateBinaries

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fatih/vim-go/issues/1945?email_source=notifications&email_token=ABTDSJMQ4QIT37HXPV7DLPTQFBPHTA5CNFSM4FS64S7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QTEPY#issuecomment-522269247,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABTDSJNHPYDW2AQWJOGORADQFBPHTANCNFSM4FS64S7A
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

groob picture groob  Â·  3Comments

andrejvanderzee picture andrejvanderzee  Â·  3Comments

mnarrell picture mnarrell  Â·  3Comments

dchaofei picture dchaofei  Â·  4Comments

wpaulino picture wpaulino  Â·  4Comments