{"action":"closed","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/502","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/502/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/502/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/502/events","html_url":"https://github.com/commercialhaskell/stack/issues/502","id":92818749,"number":502,"title":"Use file hashes instead of modification time for tracking changes","user":{"login":"hesselink","id":75477,"avatar_url":"https://avatars.githubusercontent.com/u/75477?v=3","gravatar_id":"","url":"https://api.github.com/users/hesselink","html_url":"https://github.com/hesselink","followers_url":"https://api.github.com/users/hesselink/followers","following_url":"https://api.github.com/users/hesselink/following{/other_user}","gists_url":"https://api.github.com/users/hesselink/gists{/gist_id}","starred_url":"https://api.github.com/users/hesselink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hesselink/subscriptions","organizations_url":"https://api.github.com/users/hesselink/orgs","repos_url":"https://api.github.com/users/hesselink/repos","events_url":"https://api.github.com/users/hesselink/events{/privacy}","received_events_url":"https://api.github.com/users/hesselink/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/commercialhaskell/stack/labels/in%20progress","name":"in progress","color":"ededed"},{"url":"https://api.github.com/repos/commercialhaskell/stack/labels/need-confirmation","name":"need-confirmation","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":{"login":"snoyberg","id":49415,"avatar_url":"https://avatars.githubusercontent.com/u/49415?v=3","gravatar_id":"","url":"https://api.github.com/users/snoyberg","html_url":"https://github.com/snoyberg","followers_url":"https://api.github.com/users/snoyberg/followers","following_url":"https://api.github.com/users/snoyberg/following{/other_user}","gists_url":"https://api.github.com/users/snoyberg/gists{/gist_id}","starred_url":"https://api.github.com/users/snoyberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snoyberg/subscriptions","organizations_url":"https://api.github.com/users/snoyberg/orgs","repos_url":"https://api.github.com/users/snoyberg/repos","events_url":"https://api.github.com/users/snoyberg/events{/privacy}","received_events_url":"https://api.github.com/users/snoyberg/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/commercialhaskell/stack/milestones/5","html_url":"https://github.com/commercialhaskell/stack/milestones/0.2.0.0","labels_url":"https://api.github.com/repos/commercialhaskell/stack/milestones/5/labels","id":1166824,"number":5,"title":"0.2.0.0","description":"Arbitrary date chosen, just to get the milestones to order nicely","creator":{"login":"snoyberg","id":49415,"avatar_url":"https://avatars.githubusercontent.com/u/49415?v=3","gravatar_id":"","url":"https://api.github.com/users/snoyberg","html_url":"https://github.com/snoyberg","followers_url":"https://api.github.com/users/snoyberg/followers","following_url":"https://api.github.com/users/snoyberg/following{/other_user}","gists_url":"https://api.github.com/users/snoyberg/gists{/gist_id}","starred_url":"https://api.github.com/users/snoyberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snoyberg/subscriptions","organizations_url":"https://api.github.com/users/snoyberg/orgs","repos_url":"https://api.github.com/users/snoyberg/repos","events_url":"https://api.github.com/users/snoyberg/events{/privacy}","received_events_url":"https://api.github.com/users/snoyberg/received_events","type":"User","site_admin":false},"open_issues":34,"closed_issues":66,"state":"open","created_at":"2015-06-16T14:23:31Z","updated_at":"2015-07-03T14:08:34Z","due_on":"2015-07-12T21:00:00Z","closed_at":null},"comments":8,"created_at":"2015-07-03T08:09:54Z","updated_at":"2015-07-03T14:08:34Z","closed_at":"2015-07-03T14:08:34Z","body":"As mentioned in [this email thread](https://groups.google.com/forum/#!topic/haskell-stack/Zwv-FiCixMk), switching branches, using git stash, rebasing and other operations cause lots of rebuilds, since they change the modification time of files. On the other hand, switching to a branch and back shouldn't require any rebuilds, since the sources haven't changed.\r\n\r\nTo fix this, stack could track the hash of the input files to detect changes. To make this perform, this should probably only be checked after the modification time and file size are different, as @ndmitchell mentions shake does in the email thread."}}