{"action":"created","issue":{"url":"https://api.github.com/repos/golang/dep/issues/1633","repository_url":"https://api.github.com/repos/golang/dep","labels_url":"https://api.github.com/repos/golang/dep/issues/1633/labels{/name}","comments_url":"https://api.github.com/repos/golang/dep/issues/1633/comments","events_url":"https://api.github.com/repos/golang/dep/issues/1633/events","html_url":"https://github.com/golang/dep/issues/1633","id":294665081,"number":1633,"title":"Fail to get git submodule of a package after the dep ensure command","user":{"login":"ykyuen","id":281210,"avatar_url":"https://avatars0.githubusercontent.com/u/281210?v=4","gravatar_id":"","url":"https://api.github.com/users/ykyuen","html_url":"https://github.com/ykyuen","followers_url":"https://api.github.com/users/ykyuen/followers","following_url":"https://api.github.com/users/ykyuen/following{/other_user}","gists_url":"https://api.github.com/users/ykyuen/gists{/gist_id}","starred_url":"https://api.github.com/users/ykyuen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ykyuen/subscriptions","organizations_url":"https://api.github.com/users/ykyuen/orgs","repos_url":"https://api.github.com/users/ykyuen/repos","events_url":"https://api.github.com/users/ykyuen/events{/privacy}","received_events_url":"https://api.github.com/users/ykyuen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-02-06T08:04:05Z","updated_at":"2018-03-23T17:38:35Z","closed_at":null,"author_association":"NONE","body":"### What version of `dep` are you using (`dep version`)?\r\n`v0.4.1-34-g42f17824`\r\n\r\n### What `dep` command did you run?\r\n```\r\n$ dep ensure -v\r\nGopkg.lock was already in sync with imports and Gopkg.toml\r\n(1/2) Wrote github.com/pkg/errors@v0.8.0\r\n(2/2) Wrote github.com/go-goracle/goracle@v2.1.13\r\n```\r\n\r\n### What did you expect to see?\r\n\r\nAll the files of the packages could be found inside the `vendor` folder.\r\n\r\n### What did you see instead?\r\n\r\nThe `dep ensure` command runs without problem. But when i navigate to the `./vendor/github.com/go-goracle/goracle/odpi`, the folder is empty.\r\n\r\nThe `./vendor/github.com/go-goracle/goracle/odpi` is a git submodule ([ODPI-C version 2.0.3](https://github.com/oracle/odpi/tree/8a3f81ec9d4000d1a65578b7592ac06643dbf2df)) of the [github.com/go-goracle/goracle](https://github.com/go-goracle/goracle) package. Supposingly it should contain all the files of the ODPI-C project.\r\n\r\nI checked the cache folder at `$GOPATH/pkg/dep/sources/https---github.com-go--goracle-goracle/` and the `odpi` folder there is NOT empty.\r\n\r\nIn an [article](https://medium.freecodecamp.org/an-intro-to-dep-how-to-manage-your-golang-project-dependencies-7b07d84e7ba5), @sdboyer suggests turning off unused-packages in `Gopkg.toml` but according to the [documentation](https://golang.github.io/dep/docs/Gopkg.toml.html#prune):\r\n\r\n> Pruning is disabled by default. It can be enabled by setting them to true at the root level.\r\n\r\ni did try adding the `prune` settings in the `Gopkg.toml` as follow but still no luck.\r\n```\r\n[prune]\r\n  [[prune.project]]\r\n    name = \"github.com/go-goracle/goracle\"\r\n    unused-packages = false\r\n    go-tests = false\r\n    non-go = false\r\n```\r\n\r\nI have created an [example repository](https://gitlab.com/ykyuen/dep-submodule-example) which could repeat the scenario.\r\n\r\nMy current workaround is removing the [go-goracle/goracle](https://github.com/go-goracle/goracle) dependency from the project and `go get` it instead.\r\n\r\nAnd thanks for developing the dep module. 💕"},"comment":{"url":"https://api.github.com/repos/golang/dep/issues/comments/375745111","html_url":"https://github.com/golang/dep/issues/1633#issuecomment-375745111","issue_url":"https://api.github.com/repos/golang/dep/issues/1633","id":375745111,"user":{"login":"cemremengu","id":1297759,"avatar_url":"https://avatars0.githubusercontent.com/u/1297759?v=4","gravatar_id":"","url":"https://api.github.com/users/cemremengu","html_url":"https://github.com/cemremengu","followers_url":"https://api.github.com/users/cemremengu/followers","following_url":"https://api.github.com/users/cemremengu/following{/other_user}","gists_url":"https://api.github.com/users/cemremengu/gists{/gist_id}","starred_url":"https://api.github.com/users/cemremengu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cemremengu/subscriptions","organizations_url":"https://api.github.com/users/cemremengu/orgs","repos_url":"https://api.github.com/users/cemremengu/repos","events_url":"https://api.github.com/users/cemremengu/events{/privacy}","received_events_url":"https://api.github.com/users/cemremengu/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T17:38:35Z","updated_at":"2018-03-23T17:38:35Z","author_association":"NONE","body":"Solved by https://github.com/go-goracle/goracle/pull/57\r\n\r\nMake sure switching off pruning of unused packages"}}
{"actor":{"display_login":"cemremengu"}}