Control: reassign -1 ycmd 0+20201028+git1d415c5+ds-1 Control: affects -1 vim-youcompleteme
Hi, On Fri, Jun 11, 2021 at 12:10:51PM +0200, Kyle Robbertze wrote: > When using vim-youcompleteme, the environment set GOPATH and PATH are ignored > for gopls. When opening test.go I receive the following error: > > FileNotFoundError: [Errno 2] No such file or directory: > '/home/kyle/go/bin/gopls' > > This can only be resolved by linking $GOPATH/bin/gopls to > ~/go/bin/gopls. The patch[0] we use here is rather simplistic and does exactly what the README.Debian file says, as in: pick it up from ~/go/bin/gopls. So, this is technically not a bug, but documented behaviour… close kthxbye ;P Note that Debian has gopls packaged in the meantime[1], but I was too late to notice it, so a patch to that effect (and a few more) is what I dabble at while the freeze is ongoing, so at least that should be picked up auto-magically in the future. If you could provide a (modified) patch to look at GOPATH first that would be nice. I don't have experience with Go apart from doing what the README said back than I adopted this package(set) and a smoke test so someone with actual go experience who can tell if its working would be cool! I think what we should arrive at is configured-path or /usr/bin/gopls¹ or $GOPATH/bin/gopls or ~/go/bin/gopls (although that is probably the default of $GOPATH). Upstream isn't going to be interested in any of this though, as you see in the patch they just use the binary they embed like they do for all the other things™, but I have already resigned to *go* a patch-heavy approach with these packages here so that is fine. (¹ or actually search in all of PATH now that I wrote this…) Apropos configured-path: As you use vim you can use the option `g:ycm_gopls_binary_path` to explicitly set your chosen path. You could also modify `/usr/lib/ycmd/ycmd/default_settings.json`, but that would be overridden by the next ycmd install (and is not used as you would think by all clients; I patched vim-youcompleteme to pick settings from there in Debian, but upstream refused it). Hope that helps for the short term (and stable) as I don't think the release team will be happy to accept patches for bugs which are technically documented behaviour at this stage. Best regards David Kalnischkies [0] https://salsa.debian.org/debian/ycmd/-/blob/master/debian/patches/03-go-use-home-gopls.patch [1] I am not too sure which version that is though. I got the ycmd testsuite mostly running earlier this week, but the go part is still mostly red. I hope it is just 'not the version upstream wrote their tests again' (as with clangd) but I haven't got that far in testing.
signature.asc
Description: PGP signature