{"action":"created","issue":{"url":"https://api.github.com/repos/constabulary/gb/issues/26","labels_url":"https://api.github.com/repos/constabulary/gb/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/constabulary/gb/issues/26/comments","events_url":"https://api.github.com/repos/constabulary/gb/issues/26/events","html_url":"https://github.com/constabulary/gb/issues/26","id":72548401,"number":26,"title":"Flags not being evaluated at the right time","user":{"login":"wolfeidau","id":50636,"avatar_url":"https://avatars.githubusercontent.com/u/50636?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfeidau","html_url":"https://github.com/wolfeidau","followers_url":"https://api.github.com/users/wolfeidau/followers","following_url":"https://api.github.com/users/wolfeidau/following{/other_user}","gists_url":"https://api.github.com/users/wolfeidau/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfeidau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfeidau/subscriptions","organizations_url":"https://api.github.com/users/wolfeidau/orgs","repos_url":"https://api.github.com/users/wolfeidau/repos","events_url":"https://api.github.com/users/wolfeidau/events{/privacy}","received_events_url":"https://api.github.com/users/wolfeidau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-01T23:36:04Z","updated_at":"2015-05-02T00:24:03Z","closed_at":null,"body":"Just tried to add -R to override the project root and ran into the fact that the flags are not evaluated till after the plugins.\r\n\r\nAfter adding a bit of debugging `*goroot, *goos, *goarch` will only ever get set to the default values.\r\n\r\nhttps://github.com/constabulary/gb/blob/master/cmd/gb/main.go#L77\r\n\r\nvs flags evaluated on\r\n\r\nhttps://github.com/constabulary/gb/blob/master/cmd/gb/main.go#L100\r\n"},"comment":{"url":"https://api.github.com/repos/constabulary/gb/issues/comments/98267371","html_url":"https://github.com/constabulary/gb/issues/26#issuecomment-98267371","issue_url":"https://api.github.com/repos/constabulary/gb/issues/26","id":98267371,"user":{"login":"davecheney","id":7171,"avatar_url":"https://avatars.githubusercontent.com/u/7171?v=3","gravatar_id":"","url":"https://api.github.com/users/davecheney","html_url":"https://github.com/davecheney","followers_url":"https://api.github.com/users/davecheney/followers","following_url":"https://api.github.com/users/davecheney/following{/other_user}","gists_url":"https://api.github.com/users/davecheney/gists{/gist_id}","starred_url":"https://api.github.com/users/davecheney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecheney/subscriptions","organizations_url":"https://api.github.com/users/davecheney/orgs","repos_url":"https://api.github.com/users/davecheney/repos","events_url":"https://api.github.com/users/davecheney/events{/privacy}","received_events_url":"https://api.github.com/users/davecheney/received_events","type":"User","site_admin":false},"created_at":"2015-05-02T00:24:02Z","updated_at":"2015-05-02T00:24:02Z","body":"Note, unless you're using go1.5, to do cross compiles you'll have to do\nthat 'christen your cross compile toolchain dance', gb wont save you from\nthat, and in fact, it might make it worse as we always consider the\nstandard library to be up to date irrespective of the toolchain.\n\nOn Sat, 2 May 2015 10:22 Dave Cheney <dave@cheney.net> wrote:\n\n> Yup, that's a bug. I haven't tested GOOS/GOARCH only changing the\n> toolchain via -goroot, there is a chance those former values are hard\n> coded.\n>\n> I'll fix it.\n>\n> On Sat, 2 May 2015 10:19 Mark Wolfe <notifications@github.com> wrote:\n>\n>> I pulled down the latest changes and added.\n>>\n>>     gb.Infof(\"goroot=%s goos=%s goarch=%s\", *goroot, *goos, *goarch)\n>>     tc, err := gb.NewGcToolchain(*goroot, *goos, *goarch)\n>>\n>> Passed in arm as goarch and it is still set to amd64.\n>>\n>> gb build -goarch=arm -goos=linux all\n>>\n>> got\n>>\n>> 2015/05/02 10:18:38 INFO goroot=/usr/local/Cellar/go/1.4.2/libexec goos=darwin goarch=amd64\n>>\n>> —\n>> Reply to this email directly or view it on GitHub\n>> <https://github.com/constabulary/gb/issues/26#issuecomment-98266215>.\n>>\n>\n"}}