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

Imports not resolved from $GOPATH/src if vendor directory is present

steelbrain opened this issue · 2 comments

  • Plugin version (or commit hash): 0.13.1924

  • IDE name and version: IntelliJ Idea 2016.3.3

  • Java version: 1.8.0_101

  • OS name and version: macOS Sierra

  • What are you trying to do?
    I'm trying to import a package present in $GOPATH/src into another package in $GOPATH/src while I also have vendor dir present in the importing package.

  • What would you expect to happen?
    I expect the package to be resolved correctly, because the go cli utilities like go build work without an issue

  • What happens?
    The import is not resolved.

Here's the tree of my setup

$GOROOT
├── bin
├── pkg
│   └── darwin_amd64
└── src
    ├── moneza_db
    └── moneza_users

Please show screenshot of Settings | Languages & Frameworks | Go | Go Libraries

Thanks @zolotov that was it. It was using the global GOPATH instead of the one defined locally (based on my shell config). I forgot that I didn't start IntelliJ Idea from the CLI

Thanks again 👍