fatih / vim-go

Go development plugin for Vim
https://www.patreon.com/bhcleek
Other
15.98k stars 1.45k forks source link

vim-go: Please comment on https://...537 if this impacts your workflow. #3594

Closed powerman closed 11 months ago

powerman commented 11 months ago

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

  1. I've updated vim-go from 12de6c0bc0efce3cedc5e28d4fe0ecc3a4aaeb77 to 1401b576c6ac382529188d3d26cff866139f2f9a.
  2. :GoUpdateBinaries

What did you expect to happen?

No user-visible changes.

What happened instead?

Opening any .go file (either new or existing) result in showing message in vim status line:

vim-go: Please comment on https://...537 if this impacts your workflow.

image

Downgrading vim-go to previous version didn't help, so it may be related to :GoUpgradeBinaries, but it's hard to know which binary was at which version to downgrade them too. Quick grep over vim-go code didn't found "impacts your workflow" substring, but "vim-go:" prefix means it's related to vim-go.

My best guess is this may be a message from gopls triggered by something in my config.

Configuration (MUST fill this out):

vim-go version:

1401b576c6ac382529188d3d26cff866139f2f9a

vimrc you used to reproduce:

vimrc ```vim let g:go_metalinter_command = 'golangci-lint' let g:go_fmt_fail_silently = 1 let g:go_gopls_gofumpt = v:true let g:go_gopls_local = {} autocmd FileType go call s:setlocal() let g:go_doc_keywordprg_enabled = 0 let g:go_template_use_pkg = 1 let g:go_list_type = 'quickfix' let g:go_highlight_array_whitespace_error = 1 let g:go_highlight_chan_whitespace_error = 1 let g:go_highlight_extra_types = 1 let g:go_highlight_operators = 1 let g:go_highlight_functions = 1 let g:go_highlight_function_parameters = 0 let g:go_highlight_function_calls = 1 let g:go_highlight_types = 1 let g:go_highlight_fields = 0 let g:go_highlight_build_constraints = 1 let g:go_highlight_generate_tags = 1 let g:go_highlight_string_spellcheck = 1 let g:go_highlight_format_strings = 1 let g:go_highlight_variable_declarations = 0 let g:go_highlight_variable_assignments = 0 let g:go_build_tags = 'integration' let g:go_gopls_matcher = 'caseSensitive' let g:go_gopls_deep_completion = 0 let g:go_gopls_temp_modfile = 1 let g:go_gopls_use_placeholders = 0 autocmd FileType go nmap r (go-run) autocmd FileType go nmap b (go-build) autocmd FileType go nmap t (go-test) autocmd FileType go nmap T (go-test-func) autocmd FileType go nmap c (go-coverage-toggle) autocmd FileType go nmap gd (go-def-tab) autocmd FileType go nmap gb (go-doc-browser) autocmd FileType go nmap s (go-implements) autocmd FileType go nmap i (go-info) autocmd FileType go nmap e (go-rename) autocmd FileType go iabbr errn =goiferr() function! s:goiferr() call go#iferr#Generate() return "\O" endfunction function! s:setlocal() try let l:olddir = chdir(expand('%:p:h')) let l:dir = trim(system('go list -m -f {{.Dir}}')) if !has_key(g:go_gopls_local, l:dir) let g:go_gopls_local[l:dir] = trim(system('go list -m')) endif finally call chdir(l:olddir) endtry endfunction ```

Vim version (first three lines from :version):

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 26 2023 15:49:11) Included patches: 1-1627 Modified by Gentoo-9.0.1627

Go version (go version):

go version go1.21.3 linux/amd64

Go environment

go env Output:

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/powerman/.cache/go-build'
GOENV='/home/powerman/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/powerman/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/powerman/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.3'
GCCGO='gccgo'
GOAMD64='v3'
AR='ar'
CC='x86_64-pc-linux-gnu-gcc'
CXX='x86_64-pc-linux-gnu-g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
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 -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3957576779=/tmp/go-build -gno-record-gcc-switches'

gopls version

gopls version Output:

golang.org/x/tools/gopls v0.14.1
    golang.org/x/tools/gopls@v0.14.1 h1:XaTETpi7Q67XO8nftquJitcx+9c2bPclO8Kz2sBVvec=
bhcleek commented 11 months ago

Can you run :messages? Does it show the full message?

powerman commented 11 months ago
vim-go: initializing gopls
[deoplete] [yarp] [deoplete] job is dead. failed establishing channel for ['/usr/bin/python3', '-u',
 '/home/powerman/.vim/bundle/nvim-yarp/pythonx/yarp.py', '/tmp/vuQHEFT/9', 2, 'deoplete']
[deoplete] VimEnter автокоманда для шаблона "*"..function deoplete#enable[9]..deoplete#initialize[1]
..deoplete#init#_initialize[15]..deoplete#init#_channel[24]..yarp#core#notify[1]..yarp#core#wait_cha
nnel, строка 13
vim-go: Invalid settings: gopls setting "tempModfile" is deprecated.
vim-go: Please comment on https://go.dev/issue/63537 if this impacts your workflow.
vim-go: Finished loading packages.
vim-go: Invalid settings: gopls setting "tempModfile" is deprecated.
vim-go: Please comment on https://go.dev/issue/63537 if this impacts your workflow.
bhcleek commented 11 months ago

As https://go.dev/issue/63537 indicates, if you need the tempMod setting, then comment on that issue. If you don't need it, then remove let g:go_gopls_temp_modfile = 1 from your vimrc, and the message should no longer be presented to you.

powerman commented 11 months ago

Thanks, this helps.