{"action":"created","issue":{"url":"https://api.github.com/repos/Masterminds/glide/issues/331","repository_url":"https://api.github.com/repos/Masterminds/glide","labels_url":"https://api.github.com/repos/Masterminds/glide/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/Masterminds/glide/issues/331/comments","events_url":"https://api.github.com/repos/Masterminds/glide/issues/331/events","html_url":"https://github.com/Masterminds/glide/pull/331","id":140122778,"number":331,"title":"Resolve devImports","user":{"login":"alde","id":350296,"avatar_url":"https://avatars.githubusercontent.com/u/350296?v=3","gravatar_id":"","url":"https://api.github.com/users/alde","html_url":"https://github.com/alde","followers_url":"https://api.github.com/users/alde/followers","following_url":"https://api.github.com/users/alde/following{/other_user}","gists_url":"https://api.github.com/users/alde/gists{/gist_id}","starred_url":"https://api.github.com/users/alde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alde/subscriptions","organizations_url":"https://api.github.com/users/alde/orgs","repos_url":"https://api.github.com/users/alde/repos","events_url":"https://api.github.com/users/alde/events{/privacy}","received_events_url":"https://api.github.com/users/alde/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Masterminds/glide/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Masterminds/glide/milestones/9","html_url":"https://github.com/Masterminds/glide/milestones/0.11","labels_url":"https://api.github.com/repos/Masterminds/glide/milestones/9/labels","id":1660259,"number":9,"title":"0.11","description":"","creator":{"login":"mattfarina","id":62991,"avatar_url":"https://avatars.githubusercontent.com/u/62991?v=3","gravatar_id":"","url":"https://api.github.com/users/mattfarina","html_url":"https://github.com/mattfarina","followers_url":"https://api.github.com/users/mattfarina/followers","following_url":"https://api.github.com/users/mattfarina/following{/other_user}","gists_url":"https://api.github.com/users/mattfarina/gists{/gist_id}","starred_url":"https://api.github.com/users/mattfarina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattfarina/subscriptions","organizations_url":"https://api.github.com/users/mattfarina/orgs","repos_url":"https://api.github.com/users/mattfarina/repos","events_url":"https://api.github.com/users/mattfarina/events{/privacy}","received_events_url":"https://api.github.com/users/mattfarina/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2016-03-22T16:35:33Z","updated_at":"2016-03-24T14:11:45Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2016-03-11T08:38:16Z","updated_at":"2016-04-04T15:28:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Masterminds/glide/pulls/331","html_url":"https://github.com/Masterminds/glide/pull/331","diff_url":"https://github.com/Masterminds/glide/pull/331.diff","patch_url":"https://github.com/Masterminds/glide/pull/331.patch"},"body":"Can be omitted by using the new flag --without-dev\r\n\r\nglide update [--without-dev]\r\nglide install [--without-dev]"},"comment":{"url":"https://api.github.com/repos/Masterminds/glide/issues/comments/205349895","html_url":"https://github.com/Masterminds/glide/pull/331#issuecomment-205349895","issue_url":"https://api.github.com/repos/Masterminds/glide/issues/331","id":205349895,"user":{"login":"ches","id":13277,"avatar_url":"https://avatars.githubusercontent.com/u/13277?v=3","gravatar_id":"","url":"https://api.github.com/users/ches","html_url":"https://github.com/ches","followers_url":"https://api.github.com/users/ches/followers","following_url":"https://api.github.com/users/ches/following{/other_user}","gists_url":"https://api.github.com/users/ches/gists{/gist_id}","starred_url":"https://api.github.com/users/ches/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ches/subscriptions","organizations_url":"https://api.github.com/users/ches/orgs","repos_url":"https://api.github.com/users/ches/repos","events_url":"https://api.github.com/users/ches/events{/privacy}","received_events_url":"https://api.github.com/users/ches/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T15:28:06Z","updated_at":"2016-04-04T15:28:06Z","body":"> I was originally going to suggest that we do not include dev dependencies by default (e.g. that we have --include-dev instead). But as I thought about the use case, it feels to me like the cases where we'd not want dev imports are for CI/CD and stuff like that.\r\n>\r\n> ...\r\n> - devImports is for libraries necessary only for running tests on the present project (not on things in `vendor`)\r\n>\r\n> Does that sound right?\r\n\r\nI think that a critical conflation of dev versus test has pervaded the thread—I was first confused by @technosophos's quoted mention of CI. I thought, \"I certainly do *not* want to use `--without-dev` on CI if Ginkgo is in `devImport`\", but @lpetre's example of `fresh` is exactly a case where you would. (Though, it's not really an \"import\", you don't import `fresh` in project code—maybe `devPackages`?).\r\n\r\nRuby's Bundler supports arbitrary groups with dev and test being common convention; all are installed by default, and typically `--without=dev` is used on CI and `--without=dev,test` in production. This is akin to possibilities @xeger proposed in #168.\r\n\r\nBut presumably Go build tooling does a fine job already of keeping test libraries from bloating production artifacts when they're only imported in `_test.go` files. So it seems to me like `devImports` is all that is really needed (arbitrary groups/tags seem overkill for now), but *test* dependencies do *not* go there but in `import` instead (and something must be worked out about executables like the `ginkgo` runner, as well as dev executables like `fresh`, as discussed earlier).\r\n\r\nIn that case I think it becomes the clear choice that `devImports` is only considered for the local project and not recursively within `vendor`, as @technosophos's first version above suggested. Thus making the option an opt-out `--without-dev` seems more convenient for the common use case to me.\r\n\r\nThe downside is that, if Glide looks at `glide.yaml`/`lock` files recursively in dependencies, it would be ideal if it didn't just install everything in `import`, it should probably filter out deps that it discovers are only imported in `_test.go` files. @davecgh made the fair point on #103 that `go get` doesn't waste time and space fetching test dependencies by default, unless you use `-t`. Maybe it would be easier to additionally have `testImport`, then? Doesn't help avoid waste for deps that don't use Glide, though, if test imports aren't already being omitted there (I'm not sure). Personally I don't care if `go test ./...` errors in the default case, I'm practically never going to use that without `glide novendor` so I support the opt-in `-t` equivalent."}}