Comments (12)
You should be able to build .a
files by running go install <package>
. You can use go install -i <package>
to build the .a
file for the package and its dependencies.
from gocode.
Do you have files like $GOPATH/pkg/darwin_amd64/bingo/monitor.a
?
from gocode.
@stamblerre I finally stumbled upon this answer and I can say this is the issue my side, but I have no idea how to build these objects... How do we do so?
EDIT Managed to do it by tanking the pkg
dir and rebuilding my directories. Is there a cleaner approach for this or are we waiting for the modules rewrite?
from gocode.
Having the same issue :/
from gocode.
@Vizualni: Do you have .a
files under $GOPATH/pkg
?
from gocode.
I have the same issue too. And there are no .a
file in my $GOPATH/pkg
.
I think it is because the new go cache. After go1.10, go install
is not update cache in pkg file. Like this issue said nsf#500.
I tried go install -i, and it is work.
from gocode.
@laily123: Yes, goinstall -i
is the correct solution to this problem.
from gocode.
I think this is related to #46.
I did a go get -u -v github.com/stamblerre/gocode
and gocode close
(might have done a gocode exit
for good measure) and restarted gocode with gocode
. I now have autocomplete in VS Code again.
I think my issue was the same as yours:
running $ gocode -s -debug
on line 12 of here, start to type c.
2019/02/03 08:35:40 Cursor at: 202
2019/02/03 08:35:40 -------------------------------------------------------
package main
import (
"github.com/sethgrid/simplequest/dungeon"
)
func main() {
// get config, run game
d := dungeon.MakeDungeon()
c := d.NewCell("0,1")
c.Description("you are in a clearing")
c.#
}
2019/02/03 08:35:40 -------------------------------------------------------
2019/02/03 08:35:40 Error parsing input file (outer block):
2019/02/03 08:35:40 /Users/sethammons/workspace/go/src/github.com/sethgrid/simplequest/cmd/quest/main.go:12:4: expected selector or type assertion, found ';'
2019/02/03 08:35:40 gbimporter: no package found for github.com/sethgrid/simplequest/dungeon: can't find import: "github.com/sethgrid/simplequest/dungeon"
2019/02/03 08:35:40 Elapsed duration: 464.741µs
2019/02/03 08:35:40 Offset: 0
2019/02/03 08:35:40 Number of candidates found: 0
2019/02/03 08:35:40 Candidates are:
2019/02/03 08:35:40 =======================================================
I tried this both in and out of my GOPATH. I'm not sure what the module system has done to my work set up, but things have been messed up for sure, and this made VS Code no more useful than an auto-formatter.
from gocode.
@sethgrid: For modules support, you should use stamblerre/gocode. mdempsky/gocode does not support modules. VSCode downloads both and renames the stamblerre/gocode binary to gocode-gomod, so both versions can coexist.
from gocode.
@stamblerre go install .
under workspace works for me.
from gocode.
@stamblerre yes,this problem is loss .a file. go install this project genrate .a flie is the correct solution to this problem
from gocode.
is that means, every time I change my package, I have to install it ?
from gocode.
Related Issues (20)
- Intellisense not working for imported packages when using dep HOT 3
- Panic when autocompleting files under GOPATH HOT 2
- company-go: unwanted completion menu pops up right after left curly brace HOT 3
- No auto-complete with type-assertions HOT 4
- gocode: autocomplete broken in VS Code HOT 3
- Gabage completions after `..` or `...` HOT 2
- missing dependency HOT 1
- Use claat offline
- I can't install
- gocode: not restarting HOT 2
- Contributing
- panic: runtime error: slice bounds out of range [:-1] HOT 2
- Unable to recompile gocode after upgrading golang HOT 1
- Code completion always shows "PANIC" HOT 1
- add build on save to emacs plugin HOT 2
- Antivirus software terminates and detects go-code as infected with Win32/Xpaj.gen virus HOT 1
- Autocomplete and dep's [ignored] tag HOT 2
- Performance problems on code completion suggestions HOT 13
- Automatic prompting function for package paths HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gocode.