{"action":"created","issue":{"url":"https://api.github.com/repos/kardianos/govendor/issues/157","repository_url":"https://api.github.com/repos/kardianos/govendor","labels_url":"https://api.github.com/repos/kardianos/govendor/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/kardianos/govendor/issues/157/comments","events_url":"https://api.github.com/repos/kardianos/govendor/issues/157/events","html_url":"https://github.com/kardianos/govendor/issues/157","id":158409632,"number":157,"title":"Strange behavior","user":{"login":"jefferai","id":28627,"avatar_url":"https://avatars.githubusercontent.com/u/28627?v=3","gravatar_id":"","url":"https://api.github.com/users/jefferai","html_url":"https://github.com/jefferai","followers_url":"https://api.github.com/users/jefferai/followers","following_url":"https://api.github.com/users/jefferai/following{/other_user}","gists_url":"https://api.github.com/users/jefferai/gists{/gist_id}","starred_url":"https://api.github.com/users/jefferai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jefferai/subscriptions","organizations_url":"https://api.github.com/users/jefferai/orgs","repos_url":"https://api.github.com/users/jefferai/repos","events_url":"https://api.github.com/users/jefferai/events{/privacy}","received_events_url":"https://api.github.com/users/jefferai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-06-03T16:53:44Z","updated_at":"2016-06-06T21:11:12Z","closed_at":null,"body":"I'm hitting some strange behavior and @sean- suggested putting in the status of things in a bug report.\r\n\r\nI added a new dependency (`github.com/hashicorp/scada-client/scada`) in my code and was trying to have `govendor` tell me which packages are missing.\r\n\r\nThe package to pay attention to is `go-multierror`, which already exists in `vendor/` and at the same revision.\r\n```\r\n$ govendor list +missing\r\n\r\n$ govendor list +outside\r\n e  github.com/armon/go-metrics                \r\n e  github.com/hashicorp/errwrap               \r\n e  github.com/hashicorp/go-msgpack/codec      \r\n e  github.com/hashicorp/go-multierror         \r\n e  github.com/hashicorp/net-rpc-msgpackrpc    \r\n e  github.com/hashicorp/scada-client          \r\n e  github.com/hashicorp/scada-client/scada    \r\n e  github.com/hashicorp/yamux                 \r\n\r\n$ find vendor -type d | grep multierror\r\nvendor/github.com/hashicorp/go-multierror\r\n\r\n$ govendor add github.com/hashicorp/go-multierror\r\nError: Package \"github.com/hashicorp/vault/vendor/github.com/hashicorp/go-multierror\" already in vendor.\r\n\r\n$ govendor status\r\n\r\n$ govendor list +out,^vend\r\n e  github.com/armon/go-metrics                \r\n e  github.com/hashicorp/errwrap               \r\n e  github.com/hashicorp/go-msgpack/codec      \r\n e  github.com/hashicorp/go-multierror         \r\n e  github.com/hashicorp/net-rpc-msgpackrpc    \r\n e  github.com/hashicorp/scada-client          \r\n e  github.com/hashicorp/scada-client/scada    \r\n e  github.com/hashicorp/yamux\r\n```\r\nSo basically, I have no idea what `govendor` is doing here. `+missing` reports nothing even though there's a new dependency in my code. I don't understand what it's trying to tell me about `go-multierror` since as far as I can tell that last command should be filtering out anything that's vendored alredy. I should also mention that several of the other items listed in external are also already vendored (such as `errwrap`).\r\n\r\nIt's entirely possible that the behavior with `go-multierror` is exactly what is expected, except then how do I differentiate between packages that are already vendored, and those that are not, especially when `+missing` shows me nothing and the new dependency that isn't vendored simply shows up as external:\r\n```\r\n e  github.com/hashicorp/scada-client/scada    \r\n    └──  l  github.com/hashicorp/vault/command/server\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kardianos/govendor/issues/comments/224089725","html_url":"https://github.com/kardianos/govendor/issues/157#issuecomment-224089725","issue_url":"https://api.github.com/repos/kardianos/govendor/issues/157","id":224089725,"user":{"login":"jefferai","id":28627,"avatar_url":"https://avatars.githubusercontent.com/u/28627?v=3","gravatar_id":"","url":"https://api.github.com/users/jefferai","html_url":"https://github.com/jefferai","followers_url":"https://api.github.com/users/jefferai/followers","following_url":"https://api.github.com/users/jefferai/following{/other_user}","gists_url":"https://api.github.com/users/jefferai/gists{/gist_id}","starred_url":"https://api.github.com/users/jefferai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jefferai/subscriptions","organizations_url":"https://api.github.com/users/jefferai/orgs","repos_url":"https://api.github.com/users/jefferai/repos","events_url":"https://api.github.com/users/jefferai/events{/privacy}","received_events_url":"https://api.github.com/users/jefferai/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T21:11:12Z","updated_at":"2016-06-06T21:11:12Z","body":"Hi @kardianos ,\r\n\r\nBasically, what I wanted to figure out was what packages had been added to the project that had not already been a part of the project. I realize that I could use `govendor` to simply add `external` (or `outside`) packages and then use `git status` to take a look, but I figured that `govendor` would be able to do this for me without requiring an external tool. (Also, attempting to add a package that already exists in `vendor/` results in an error, so I don't know whether or not that holds true if some packages in a list already exist or whether it simply adds what doesn't exist yet.)\r\n\r\nI understand what you're saying above about you considering the old behavior a bug -- but it's actually the behavior that I want/was expecting. The fact that a package in GOPATH is a different package (in terms of the Go compiler) to one in `vendor` is only interesting to me in the sense that if I am referencing an external package, I need to fix my vendored deps so that I am *not* be referencing such a package.\r\n\r\nSo in other words, I was looking for a way to understand _which items I need to vendor_. In this sense, it's unintuitive to be showing the full set of deps in GOPATH when 9/10 of them are already in `vendor/` -- as soon as I put the 10th in `vendor/`, those cease to be relevant...and in fact, in some sense they're already irrelevant because whatever version of those packages live in `vendor/` are going to be the versions that my new dep will be using as soon as I add it to `vendor/`.\r\n\r\nOne thing that might have been useful would have been to show a different status letter for items in GOPATH (but not vendor) that are referenced directly from my project vs ones that are shown because they are referenced from that first set.\r\n\r\nAlternately, changing the meaning of `missing` might be useful; to me it's generally not useful to know which packages are not found in either `vendor/` or GOPATH, because either way we can assume build will fail -- I'm going to know about this right away.\r\n\r\nI can imagine other potential ways to tackle this. What are your thoughts so far?"}}
{"actor":{"display_login":"jefferai"}}