stamblerre / gocode

An autocompletion daemon for the Go programming language
MIT License
394 stars 28 forks source link

gocode: not working with stdin #37

Closed rokf closed 3 years ago

rokf commented 5 years ago

Summary

Hello, I've tried to use your fork of gocode today and it does not return any completions when I pass the code via stdin.

If I use the -in file path flag instead it works.

The project is outside the GOPATH and is using modules.

What version of Go are you using (go version)?

go version go1.12.4 linux/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/rokf/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/rokf/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build124586583=/tmp/go-build -gno-record-gcc-switches"
rokf commented 5 years ago

I've tried replacing the whole if-else statement https://github.com/stamblerre/gocode/blob/master/client.go#L173 with the stdin thingy in else and it works.

Looks to me like the stdin way still requires the filename (-in flag).

stamblerre commented 4 years ago

This repository is in maintenance mode, so I will not be making any fixes. If you would like to contribute a PR, I will happily take a look at it.

stamblerre commented 3 years ago

This repository is being archived in favor of gopls, the Go language server. Fixes will no longer be accepted.