{"action":"created","issue":{"url":"https://api.github.com/repos/kardianos/vendor-spec/issues/11","labels_url":"https://api.github.com/repos/kardianos/vendor-spec/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/kardianos/vendor-spec/issues/11/comments","events_url":"https://api.github.com/repos/kardianos/vendor-spec/issues/11/events","html_url":"https://github.com/kardianos/vendor-spec/issues/11","id":74105344,"number":11,"title":"Example 1, packages tls and context is incorrect","user":{"login":"kardianos","id":755121,"avatar_url":"https://avatars.githubusercontent.com/u/755121?v=3","gravatar_id":"","url":"https://api.github.com/users/kardianos","html_url":"https://github.com/kardianos","followers_url":"https://api.github.com/users/kardianos/followers","following_url":"https://api.github.com/users/kardianos/following{/other_user}","gists_url":"https://api.github.com/users/kardianos/gists{/gist_id}","starred_url":"https://api.github.com/users/kardianos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kardianos/subscriptions","organizations_url":"https://api.github.com/users/kardianos/orgs","repos_url":"https://api.github.com/users/kardianos/repos","events_url":"https://api.github.com/users/kardianos/events{/privacy}","received_events_url":"https://api.github.com/users/kardianos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-07T19:48:32Z","updated_at":"2015-05-08T17:13:30Z","closed_at":null,"body":"Current vendor tool implementation and the spec differ on what the Vendor field should say. Take this package entry in Example 1:\r\n```\r\n{\r\n\t\"Vendor\": \"github.com/coreos/etcd/internal/golang.org/x/net/context\",\r\n\t\"Local\": \"github.com/kardianos/mypkg/internal/golang.org/x/net/context\",\r\n\t\"Revision\": \"25f1feceb5e13da68a35ee552069f86d18d63fee\",\r\n\t\"RevisionTime\": \"2015-04-09T05:06:17Z-08:00\"\r\n}\r\n```\r\nIt is shown here that the Vendor path is \"github.com/coreos/etcd/internal/golang.org/x/net/context\". However the vendor tool actually records a Vendor path of \"golang.org/x/net/context\". I think the tool is correct and the spec is wrong (and sufficiently precise).\r\n\r\nAt the same time I don't actually want to loose the fact that the files came from \"etcd\". I think this sounds like what @kr observed in issue #6 . Perhaps this would be the correct package entry:\r\n```\r\n{\r\n\t\"Vendor\": \"golang.org/x/net/context\",\r\n\t\"AltURL\": \"github.com/coreos/etcd/internal/golang.org/x/net/context\",\r\n\t\"Local\": \"github.com/kardianos/mypkg/internal/golang.org/x/net/context\",\r\n\t\"Revision\": \"25f1feceb5e13da68a35ee552069f86d18d63fee\",\r\n\t\"RevisionTime\": \"2015-04-09T05:06:17Z-08:00\"\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kardianos/vendor-spec/issues/comments/100301803","html_url":"https://github.com/kardianos/vendor-spec/issues/11#issuecomment-100301803","issue_url":"https://api.github.com/repos/kardianos/vendor-spec/issues/11","id":100301803,"user":{"login":"kardianos","id":755121,"avatar_url":"https://avatars.githubusercontent.com/u/755121?v=3","gravatar_id":"","url":"https://api.github.com/users/kardianos","html_url":"https://github.com/kardianos","followers_url":"https://api.github.com/users/kardianos/followers","following_url":"https://api.github.com/users/kardianos/following{/other_user}","gists_url":"https://api.github.com/users/kardianos/gists{/gist_id}","starred_url":"https://api.github.com/users/kardianos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kardianos/subscriptions","organizations_url":"https://api.github.com/users/kardianos/orgs","repos_url":"https://api.github.com/users/kardianos/repos","events_url":"https://api.github.com/users/kardianos/events{/privacy}","received_events_url":"https://api.github.com/users/kardianos/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T17:13:30Z","updated_at":"2015-05-08T17:13:30Z","body":"I don't have time to implement this right now, so I'll stick with a thought experiment:\r\n### Field containing GOPATH\r\n * Record the path relative to GOPATH it should copy files from if different from the Vendor field.\r\n * Requires path to be present to update.\r\n\r\n### Field containing repository URL\r\n * Useful for tools that can fetch specific versions or update to the latest directly from a remote repo.\r\n * If used with a go get meta header redirect, it could be discovered from a GOPATH.\r\n\r\n### This applies to\r\n * Import path rewrites\r\n * Copy packages locally, but use GOPATH per project.\r\n * No copy, only fetch packages, use GOPATH per project.\r\n \r\nFor non-\"import path rewrite\" solutions, this could be a local mirror, even while keeping the canonical vendor import path intact.\r\n\r\nWith the custom import path http://golang.org/cmd/go/#hdr-Remote_import_paths we could simply use that to translate to the actual repo urls. Then to tool could define when it used the local filesystem and when it would use the path to lookup the remote path.\r\n\r\n@jingweno you might have a better opinion on this then I do as it looks like you've implemented updating from remotes. Thoughts? (See #6 as well.)"}}