{"action":"closed","issue":{"url":"https://api.github.com/repos/golang/go/issues/3895","labels_url":"https://api.github.com/repos/golang/go/issues/3895/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/3895/comments","events_url":"https://api.github.com/repos/golang/go/issues/3895/events","html_url":"https://github.com/golang/go/issues/3895","id":51281319,"number":3895,"title":"cmd/go: does not rebuild when source files are removed","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/Suggested","name":"Suggested","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestones/Unplanned","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":868,"closed_issues":37,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2015-06-04T04:11:13Z","due_on":"2099-12-31T05:00:00Z","closed_at":null},"comments":34,"created_at":"2012-08-02T08:16:23Z","updated_at":"2015-06-04T04:11:13Z","closed_at":"2015-06-04T04:11:13Z","body":"<pre>This is how I broke our build.\n\n% pwd\n/home/rog/src/go/src/local/gobug\n% ls\n% cat &gt; foo.go\npackage foo\nvar X = 0\n^D\n% cat &gt; bar.go\npackage foo\nvar Y = 0\n^D\n% cat &gt; foo_test.go\npackage foo_test\nimport (\n\t&quot;testing&quot;\n\tfoo &quot;local/gobug&quot;\n)\nfunc TestX(t *testing.T){\n\t_ = foo.X\n}\n^D\n% go test\nPASS\nok  \tlocal/gobug\t0.011s\n% go install\n% rm foo.go      # as it happens, i actually moved it elsewhere.\n% go build\n% go install\n% go test\nPASS\nok  \tlocal/gobug\t0.011s\n# everything looks just fine, so i pushed to trunk here, breaking\n# the build.\n% touch *.go\n% go test\n# local/gobug_test\n./foo_test.go:7: undefined: foo.X\nFAIL\tlocal/gobug [build failed]\n% \n\nI wonder if the go tool should look at the mtime of the\ndirectory as well as the source files when determining\nwhether to rebuild.</pre>"}}