{"action":"created","issue":{"url":"https://api.github.com/repos/go-task/task/issues/53","repository_url":"https://api.github.com/repos/go-task/task","labels_url":"https://api.github.com/repos/go-task/task/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/go-task/task/issues/53/comments","events_url":"https://api.github.com/repos/go-task/task/issues/53/events","html_url":"https://github.com/go-task/task/issues/53","id":243179723,"number":53,"title":"Multiple tasks with the same dependency should run dependency once!","user":{"login":"smyrman","id":75205,"avatar_url":"https://avatars6.githubusercontent.com/u/75205?v=4","gravatar_id":"","url":"https://api.github.com/users/smyrman","html_url":"https://github.com/smyrman","followers_url":"https://api.github.com/users/smyrman/followers","following_url":"https://api.github.com/users/smyrman/following{/other_user}","gists_url":"https://api.github.com/users/smyrman/gists{/gist_id}","starred_url":"https://api.github.com/users/smyrman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smyrman/subscriptions","organizations_url":"https://api.github.com/users/smyrman/orgs","repos_url":"https://api.github.com/users/smyrman/repos","events_url":"https://api.github.com/users/smyrman/events{/privacy}","received_events_url":"https://api.github.com/users/smyrman/received_events","type":"User","site_admin":false},"labels":[{"id":548521893,"url":"https://api.github.com/repos/go-task/task/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-15T14:53:41Z","updated_at":"2017-07-15T19:34:40Z","closed_at":null,"body":"I have multiple tasks in my `Taskfile` that depend on a single task called `go-dep` that runs the command `glide install`. When I run `task` to build multiple targets, I would expect go-dep to be called at most 1 time (zero if it's found to be up-to-date). Instead, I see it's called once for each task that depend on it:\r\n\r\n```go\r\n$ task\r\ntask: No argument given, trying default task\r\nglide install\r\nglide install\r\nglide install\r\nglide install\r\n```\r\n\r\nPS! `go-deps` in this case is called with no vars, but the rule should really apply to run a dep at most 1 time when the vars are _exactly_ the same."},"comment":{"url":"https://api.github.com/repos/go-task/task/issues/comments/315556871","html_url":"https://github.com/go-task/task/issues/53#issuecomment-315556871","issue_url":"https://api.github.com/repos/go-task/task/issues/53","id":315556871,"user":{"login":"andreynering","id":7011819,"avatar_url":"https://avatars6.githubusercontent.com/u/7011819?v=4","gravatar_id":"","url":"https://api.github.com/users/andreynering","html_url":"https://github.com/andreynering","followers_url":"https://api.github.com/users/andreynering/followers","following_url":"https://api.github.com/users/andreynering/following{/other_user}","gists_url":"https://api.github.com/users/andreynering/gists{/gist_id}","starred_url":"https://api.github.com/users/andreynering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreynering/subscriptions","organizations_url":"https://api.github.com/users/andreynering/orgs","repos_url":"https://api.github.com/users/andreynering/repos","events_url":"https://api.github.com/users/andreynering/events{/privacy}","received_events_url":"https://api.github.com/users/andreynering/received_events","type":"User","site_admin":false},"created_at":"2017-07-15T19:34:40Z","updated_at":"2017-07-15T19:34:40Z","body":"Maybe we get a solution to this someday. I'm don't have anything in mind now.\r\n\r\nBy now, you can workaround it in at least two ways:\r\n\r\n```yml\r\n# remove `go-deps` as a dependency of each build\r\nbuild-all:\r\n  deps:\r\n    - go-deps\r\n    - cmd/go-binary1\r\n    - cmd/go-binary2\r\n    - cmd/go-binary4\r\n    - cmd/go-binary3\r\n```\r\n\r\n```yml\r\n# run serially instead of concurrently\r\n# e.g.: use `cmds` instead of `deps`\r\nbuild-all:\r\n  cmds:\r\n    - task: cmd/go-binary1\r\n    - task: cmd/go-binary2\r\n    - task: cmd/go-binary4\r\n    - task: cmd/go-binary3\r\n```"}}
{"actor":{"display_login":"andreynering"}}