go-lang-plugin-org / go-lang-idea-plugin

Google Go language IDE built using the IntelliJ Platform
https://plugins.jetbrains.com/plugin/5047
Other
4.56k stars 570 forks source link

Vendor directory in parent directory doesn't resolve #2844

Closed markmandel closed 7 years ago

markmandel commented 7 years ago

Plugin version (or commit hash): 0.12.1885 IntelliJ IDEA 2016.2.4 Build #IU-162.2032.8, built on September 9, 2016 Licensed to Mark Mandel JRE: 1.8.0_112-release-b343 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Ubuntu 14.04

If you have a vendor directory in a parent of the code that is currently being worked on, it doesn't resolve for code completion.

In the below example I have the following folder stucture:

➜  tree -d src
src
└── fetch
    ├── app
    ├── Godeps
    └── vendor
        ├── github.com
        │   └── golang
        │       └── protobuf
        │           └── proto
        ├── golang.org
        │   └── x
        │       └── net
        │           └── context
        └── google.golang.org
            └── appengine
                ├── internal
                │   ├── app_identity
                │   ├── base
                │   ├── datastore
                │   ├── log
                │   ├── modules
                │   ├── remote_api
                │   └── urlfetch
                ├── log
                └── urlfetch

In /src/fetch/app there is go code. When editing code in src/fetch/app, it doesn't autocomplete and introspect the libraries in /src/fetch/vendor - and it should, according to the vendoring spec.

In the image, you can see how much of the code is red, even though the code is in the parent vendor directory:

Example

Please let me know if i can provide any more details.

zolotov commented 7 years ago

Please provide following details: librarias settings, vendoring settings and ask version

zolotov commented 7 years ago

Sdk version*

markmandel commented 7 years ago

Library settings: Project Libraries are set to my gopath, which this library is in.

Vendoring is enabled (and the vendoring directory does resolve if it's in the child directory of the source code)

sdk is:

☁  /go  goapp version
go version go1.6.2 (appengine-1.9.40) linux/amd64
markmandel commented 7 years ago

Gentle bump on this, as I just ran into this issue again today.

zolotov commented 7 years ago

Closing https://youtrack.jetbrains.com/issue/GO-3410#comment=27-1892931