{"action":"created","issue":{"url":"https://api.github.com/repos/ugorji/go/issues/145","repository_url":"https://api.github.com/repos/ugorji/go","labels_url":"https://api.github.com/repos/ugorji/go/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/ugorji/go/issues/145/comments","events_url":"https://api.github.com/repos/ugorji/go/issues/145/events","html_url":"https://github.com/ugorji/go/issues/145","id":135828864,"number":145,"title":"Codecgen does not install package dependencies, which could make clean builds slow if codecgen run first","user":{"login":"2opremio","id":2362916,"avatar_url":"https://avatars.githubusercontent.com/u/2362916?v=3","gravatar_id":"","url":"https://api.github.com/users/2opremio","html_url":"https://github.com/2opremio","followers_url":"https://api.github.com/users/2opremio/followers","following_url":"https://api.github.com/users/2opremio/following{/other_user}","gists_url":"https://api.github.com/users/2opremio/gists{/gist_id}","starred_url":"https://api.github.com/users/2opremio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2opremio/subscriptions","organizations_url":"https://api.github.com/users/2opremio/orgs","repos_url":"https://api.github.com/users/2opremio/repos","events_url":"https://api.github.com/users/2opremio/events{/privacy}","received_events_url":"https://api.github.com/users/2opremio/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-02-23T18:55:38Z","updated_at":"2016-03-07T09:58:17Z","closed_at":"2016-03-04T13:16:36Z","body":"We have chosen for our build system to invoke `codecgen` on the fly instead of committing the resulting files to avoid the problems resulting from it (conflicts etc ...).\r\n\r\nHowever, clean builds are really slow because `codecgen`, when invoking `go run`,  builds all the dependencies of the package temporarily and throws the result away. After that, we build the project itself, and all that work needs to be repeated, causing a tremendous slowdown in our CI pipeline.\r\n\r\nTo fix this, I had a patch on the way to pass `-i` to `go run`: https://github.com/2opremio/go-1/commit/c99c16dd7787e9a24ca61630968d288bf870b0c6 ... except `go run` doesn't seem to accept `-i`.\r\n\r\nUsing `go build`+executing the resulting file instead of  invoking `go run` would make this possible, but I wanted to check if this would be acceptable before submitting a patch.\r\n\r\nSee https://github.com/weaveworks/scope/issues/1004"},"comment":{"url":"https://api.github.com/repos/ugorji/go/issues/comments/193186782","html_url":"https://github.com/ugorji/go/issues/145#issuecomment-193186782","issue_url":"https://api.github.com/repos/ugorji/go/issues/145","id":193186782,"user":{"login":"2opremio","id":2362916,"avatar_url":"https://avatars.githubusercontent.com/u/2362916?v=3","gravatar_id":"","url":"https://api.github.com/users/2opremio","html_url":"https://github.com/2opremio","followers_url":"https://api.github.com/users/2opremio/followers","following_url":"https://api.github.com/users/2opremio/following{/other_user}","gists_url":"https://api.github.com/users/2opremio/gists{/gist_id}","starred_url":"https://api.github.com/users/2opremio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2opremio/subscriptions","organizations_url":"https://api.github.com/users/2opremio/orgs","repos_url":"https://api.github.com/users/2opremio/repos","events_url":"https://api.github.com/users/2opremio/events{/privacy}","received_events_url":"https://api.github.com/users/2opremio/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T09:58:17Z","updated_at":"2016-03-07T09:58:17Z","body":"Unfortunately it's not as simple as \r\n\r\n```\r\ngo build -i .\r\ncodecgen -o output.go file1.go file2.go ...\r\n```\r\n\r\nYou also need to make sure output.go is not included in the build see https://github.com/weaveworks/scope/issues/1134"}}