[master] Special treatment for "C" package.#44
Conversation
|
It works, for me, thx |
|
It has no effect in go1.7 linux/amd64. |
|
@applee How does it look on your side? It's a hard-coded workaround for "C". It cannot jump to definition on "C" but at least parses for other definitions. |
| if declIdent == nil { | ||
| filename := p.fset.Position(path.Pos()).Filename | ||
| name, err := p.pathToName(litToString(path), filepath.Dir(filename)) | ||
| if litToString(path) == "C" { |
There was a problem hiding this comment.
maybe only do this if name is also "" (and would therefore fail otherwise)?
|
This fixed it for me as well. Can this be merged? |
|
I had the same issue with https://github.com/aarzilli/golua. This PR fixes it. (On 1.7 as well, btw.) |
|
At least for me, this patch doesn't work anymore with vendor directories. |
|
Since the |
|
I am encountering this problem, too. Go version is 1.8 ( also wrong in 1.7, too). #44 fixes the "C" import problem, but hit another problem: |
|
@jwendel @shahuwang you might like to try #61 as an alternative solution |
|
Now I believe this is obsoleted by #62 |
Fixes #41 (at least for me).
import "C"is not a real package. Sogodefcannot correctly parse any package that saysimport "C". This adds a special treatment for this package and circumvents this problem.