Skip to content

mingw: Incompatible with mingw64 #3447

Open
@bmccord2

Description

@bmccord2

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

Ran plugin with mingw64 (git bash for windows). I believe this problem likely would affect msys2 as well.

What did you expect to happen?

What happened instead?

When opening a file paths are not properly formed in plugin. I get a message like:
vim-go: failed to load view for file:///C:/c/path/to/my/project: invalid workspace folder path: The system cannot find the path specified.; check that the casing of the configured workspace folder path agrees with the casing reported by the operating system

Looked into the code a little bit, has('Win32') is used by the IsWin function in util.vim. This returns 0 for msys2/mingw64. has('Win32unix') returns 1 as does has('unix').

Also, GoInstallBinaries did not work without explicitly setting GOBIN variable as GOPATH/bin (not sure if this is related or not, I no longer have the error messages, but they complained about GOBIN).

Configuration (MUST fill this out):

vim-go version:

4d6962d

vimrc you used to reproduce:

vimrc
set nocompatible              " be iMproved, required
filetype off                  " required

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"call vundle#begin('~/some/path/here')

Plugin 'VundleVim/Vundle.vim'


Plugin 'heavenshell/vim-pydocstring'
Plugin 'wannesm/wmgraphviz.vim'
Plugin 'vim-scripts/reload.vim'
Plugin 'vim-scripts/vim-misc'
Plugin 'romainl/Apprentice'
Plugin 'iamcco/markdown-preview.nvim'
Plugin 'fatih/vim-go'



call vundle#end()            " required
filetype plugin indent on    " required
"filetype plugin on

colorscheme default

if &diff
    colorscheme molokai
endif

:set tabstop=4
:set shiftwidth=4
:set softtabstop=4
:set expandtab
:set autoindent

augroup myvimrchooks
    au!
    autocmd bufwritepost .vimrc source ~/.vimrc
augroup END

filetype plugin on

autocmd FileType yaml setlocal shiftwidth=2 tabstop=2 softtabstop=2

nmap <silent> <c-p> <Plug>(pydocstring)

nnoremap <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>

Vim version (first three lines from :version):

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Nov 22 2021 19:31:05)
Included patches: 1-3582
Compiled by <https://www.msys2.org/>

Go version (go version):

go version go1.19 windows/amd64

Go environment

go env Output:
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\bmccord\AppData\Local\go-build
set GOENV=C:\Users\bmccord\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\bmccord\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:/Users/bmccord/go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.19
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\bmccord\AppData\Local\Temp\go-build3966281748=/tmp/go-build -gno-record-gcc-switches

gopls version

gopls version Output:
golang.org/x/tools/gopls v0.9.4
    golang.org/x/tools/[email protected] h1:YhHOxVi++ILnY+QnH9FGtRKZZrunSaR7OW8/dCp7bBk=

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions