{"action":"opened","issue":{"url":"https://api.github.com/repos/DisposaBoy/GoSublime/issues/843","repository_url":"https://api.github.com/repos/DisposaBoy/GoSublime","labels_url":"https://api.github.com/repos/DisposaBoy/GoSublime/issues/843/labels{/name}","comments_url":"https://api.github.com/repos/DisposaBoy/GoSublime/issues/843/comments","events_url":"https://api.github.com/repos/DisposaBoy/GoSublime/issues/843/events","html_url":"https://github.com/DisposaBoy/GoSublime/issues/843","id":330893935,"node_id":"MDU6SXNzdWUzMzA4OTM5MzU=","number":843,"title":"Autocomplete doesn't use the .a files built from vendor directories","user":{"login":"jakelucas","id":5120461,"node_id":"MDQ6VXNlcjUxMjA0NjE=","avatar_url":"https://avatars3.githubusercontent.com/u/5120461?v=4","gravatar_id":"","url":"https://api.github.com/users/jakelucas","html_url":"https://github.com/jakelucas","followers_url":"https://api.github.com/users/jakelucas/followers","following_url":"https://api.github.com/users/jakelucas/following{/other_user}","gists_url":"https://api.github.com/users/jakelucas/gists{/gist_id}","starred_url":"https://api.github.com/users/jakelucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakelucas/subscriptions","organizations_url":"https://api.github.com/users/jakelucas/orgs","repos_url":"https://api.github.com/users/jakelucas/repos","events_url":"https://api.github.com/users/jakelucas/events{/privacy}","received_events_url":"https://api.github.com/users/jakelucas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-09T14:59:16Z","updated_at":"2018-06-09T14:59:16Z","closed_at":null,"author_association":"NONE","body":"I've just cleaned out my entire Go folder structure, including deleting all packages that were built in the `pkg` directory, and because of this the autocomplete stopped working.\r\n\r\nI know that gocode needs the built package files in order to work, but the difference between my previous folder contents and the contents now is that I use vendor folders for every single project, so nothing gets built and put into the pkg directory by default anymore.\r\n\r\nBecause of this I started including the `-i` flag in my calls to `go install`, so my install command looks something like this `go install -i -v <project-here>`.\r\n\r\nUsing the `-i` flag like this does build `.a` package files into the `pkg` folder for me, but autocomplete still doesn't work. I think this is because the `-i` flag builds vendored packages in a different path to the one that appears in the imports in the code.\r\n\r\nFor example, if I import the package `\"github.com/go-chi/chi\"` in my source code and that package only exists in the `vendor` folder in my project, then normally it won't show up as a built package in the pkg folder through a regular `go install`.\r\n\r\nIf I were to just use `go get` and not a tool like dep, then it would be built as a package in the pkg folder under a path like `<arch>/github.com/go-chi/chi.a`, but if I use the `-i` flag with `go install` for my project then the dependency package will be built under a path like `<arch>/my/project/vendor/github.com/go-chi/chi.a`.\r\n\r\nAs you can see the path `\"my/project/vendor/github.com/go-chi/chi\"` is quite different from the import path of `\"github.com/go-chi/chi\"` in the source code.\r\n\r\nIf I manually move the built package file into a directory that matches the path of the import in the source code then the autocomplete starts working again.\r\n\r\nIs there a way to tell gocode, through GoSublime, to check the vendor directories that exist under pkg as well?\r\nIf not is there some other way around this problem that doesn't involve just using `go get` to force the package to be built under the pkg directory?"}}
{"actor":{"display_login":"jakelucas"}}