ycmd icon indicating copy to clipboard operation
ycmd copied to clipboard

Running install script of YouCompleteMe fails on go-completer step when using go 1.25.1

Open sjakobs opened this issue 3 months ago • 2 comments

When running the install script from YouCompleteMe it fails with the following message third_party/go/pkg/mod/golang.org/x/[email protected]/internal/tokeninternal/tokeninternal.go:64:9: invalid array length -delta * delta (constant -256 of type int64)

full output

python3 install.py --all
Generating ycmd build configuration...OK
Compiling ycmd target: ycm_core...OK
Building watchdog module...OK
Building regex module...OK
Installing Omnisharp for C# support.../home/user/.vim/pack/YouCompleteMe/start/YouCompleteMe/third_party/ycmd/build.py:899: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
  package_tar.extractall()
OK
Building gopls for go completion...go: downloading golang.org/x/tools v0.16.1
go: downloading golang.org/x/tools/gopls v0.16.1
go: downloading golang.org/x/telemetry v0.0.0-20240607193123-221703e18637
go: downloading golang.org/x/tools v0.22.1-0.20240628205440-9c895dd76b34
go: downloading golang.org/x/sync v0.7.0
go: downloading golang.org/x/vuln v1.0.4
go: downloading golang.org/x/mod v0.18.0
go: downloading mvdan.cc/xurls/v2 v2.5.0
go: downloading honnef.co/go/tools v0.4.7
go: downloading mvdan.cc/gofumpt v0.6.0
go: downloading golang.org/x/text v0.16.0
go: downloading github.com/google/go-cmp v0.6.0
go: downloading golang.org/x/exp/typeparams v0.0.0-20221212164502-fae10dda9338
go: downloading github.com/BurntSushi/toml v1.2.1
# golang.org/x/tools/internal/tokeninternal
third_party/go/pkg/mod/golang.org/x/[email protected]/internal/tokeninternal/tokeninternal.go:64:9: invalid array length -delta * delta (constant -256 of type int64)

FAILED
Trying legacy get get...go: go.mod file not found in current directory or any parent directory.
	'go get' is no longer supported outside a module.
	To build and install a command, use 'go install' with a version,
	like 'go install example.com/cmd@latest'
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.

FAILED

The installation failed; please see above for the actual error. In order to get more information, please re-run the command, adding the --verbose flag. If you think this is a bug and you raise an issue, you MUST include the *full verbose* output.

For example, run:/usr/bin/python3 /home/seb/.vim/pack/YouCompleteMe/start/YouCompleteMe/third_party/ycmd/build.py --all --verbose

I expected the install script to also work with go 1.25.1

It looks like this issue is due to a dependency being incompatible with go 1.25 https://github.com/golang/go/issues/74462

In my test I could make the install step work, by increasing the gopls version to v0.20.0 in https://github.com/ycm-core/ycmd/blob/master/build.py#L967

I would be happy to provide a pull request for this.

sjakobs avatar Oct 09 '25 11:10 sjakobs

PR to update gopls very welcome.

puremourning avatar Oct 09 '25 13:10 puremourning

could you please review #1794

sjakobs avatar Oct 09 '25 21:10 sjakobs

Fixed by #1794

puremourning avatar Dec 29 '25 17:12 puremourning