{"action":"created","issue":{"url":"https://api.github.com/repos/golang/dep/issues/148","repository_url":"https://api.github.com/repos/golang/dep","labels_url":"https://api.github.com/repos/golang/dep/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/golang/dep/issues/148/comments","events_url":"https://api.github.com/repos/golang/dep/issues/148/events","html_url":"https://github.com/golang/dep/issues/148","id":203019311,"node_id":"MDU6SXNzdWUyMDMwMTkzMTE=","number":148,"title":"dep init fails if in not in $GOPATH[...]/src/{somedir..}","user":{"login":"pbennett","id":170563,"node_id":"MDQ6VXNlcjE3MDU2Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/170563?v=4","gravatar_id":"","url":"https://api.github.com/users/pbennett","html_url":"https://github.com/pbennett","followers_url":"https://api.github.com/users/pbennett/followers","following_url":"https://api.github.com/users/pbennett/following{/other_user}","gists_url":"https://api.github.com/users/pbennett/gists{/gist_id}","starred_url":"https://api.github.com/users/pbennett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbennett/subscriptions","organizations_url":"https://api.github.com/users/pbennett/orgs","repos_url":"https://api.github.com/users/pbennett/repos","events_url":"https://api.github.com/users/pbennett/events{/privacy}","received_events_url":"https://api.github.com/users/pbennett/received_events","type":"User","site_admin":false},"labels":[{"id":520537703,"node_id":"MDU6TGFiZWw1MjA1Mzc3MDM=","url":"https://api.github.com/repos/golang/dep/labels/feedback","name":"feedback","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":29,"created_at":"2017-01-25T05:57:33Z","updated_at":"2018-10-25T04:41:39Z","closed_at":null,"author_association":"NONE","body":"If GOPATH is foo/bar/ then running dep init from /foo/bar/src\r\nyields:\r\ndetermineProjectRoot: /foo/bar/src not in any $GOPATH\r\nyet it most certainly is in the GOPATH.  \r\n\r\nI'll leave the commentary off about why I want this, but if this is going to be disallowed for now, a better error is needed.\r\n"},"comment":{"url":"https://api.github.com/repos/golang/dep/issues/comments/432912516","html_url":"https://github.com/golang/dep/issues/148#issuecomment-432912516","issue_url":"https://api.github.com/repos/golang/dep/issues/148","id":432912516,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjkxMjUxNg==","user":{"login":"notzippy","id":1387526,"node_id":"MDQ6VXNlcjEzODc1MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1387526?v=4","gravatar_id":"","url":"https://api.github.com/users/notzippy","html_url":"https://github.com/notzippy","followers_url":"https://api.github.com/users/notzippy/followers","following_url":"https://api.github.com/users/notzippy/following{/other_user}","gists_url":"https://api.github.com/users/notzippy/gists{/gist_id}","starred_url":"https://api.github.com/users/notzippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notzippy/subscriptions","organizations_url":"https://api.github.com/users/notzippy/orgs","repos_url":"https://api.github.com/users/notzippy/repos","events_url":"https://api.github.com/users/notzippy/events{/privacy}","received_events_url":"https://api.github.com/users/notzippy/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T04:41:39Z","updated_at":"2018-10-25T04:41:39Z","author_association":"NONE","body":"Not sure if this is the same issue or not - but it is the same error. \r\n\r\nIf the GOPATH is based on symlinks the `dep` tool fails reporting that the `realpath` does not match any GOPATH. eg \r\n```\r\n$ export GOPATH=~/home/symlinkedpath/gopath\r\n$ realpath $GOPATH\r\n$ /mnt/dev/gopath\r\n$ cd ~/home/symlinkedpath/gopath/src/test && dep ensure\r\n/mnt/dev/gopath is not within a known GOPATH/src\r\n```\r\n\r\nMy quick fix for this is running the `dep` tool by proxy and creating a new GOPATH based on the `filepath.EvalSymlinks` for each existing part in the GOPATH\r\n```\r\n\trealPath := &bytes.Buffer{}\r\n\tfor _, p := range filepath.SplitList(build.Default.GOPATH) {\r\n\t\trp,_ := filepath.EvalSymlinks(p)\r\n\t\tif realPath.Len() > 0 {\r\n\t\t\trealPath.WriteString(string(filepath.ListSeparator))\r\n\t\t}\r\n\t\trealPath.WriteString(rp)\r\n\t}\r\n        // Call dep using realPath for GOPATH\r\n```\r\n"}}
{"actor":{"display_login":"notzippy"}}