{"action":"created","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/2357","repository_url":"https://api.github.com/repos/commercialhaskell/stack","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/2357/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/2357/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/2357/events","html_url":"https://github.com/commercialhaskell/stack/issues/2357","id":164657223,"number":2357,"title":"re-running Setup.hs and change detection","user":{"login":"emmanueltouzery","id":339433,"avatar_url":"https://avatars.githubusercontent.com/u/339433?v=3","gravatar_id":"","url":"https://api.github.com/users/emmanueltouzery","html_url":"https://github.com/emmanueltouzery","followers_url":"https://api.github.com/users/emmanueltouzery/followers","following_url":"https://api.github.com/users/emmanueltouzery/following{/other_user}","gists_url":"https://api.github.com/users/emmanueltouzery/gists{/gist_id}","starred_url":"https://api.github.com/users/emmanueltouzery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmanueltouzery/subscriptions","organizations_url":"https://api.github.com/users/emmanueltouzery/orgs","repos_url":"https://api.github.com/users/emmanueltouzery/repos","events_url":"https://api.github.com/users/emmanueltouzery/events{/privacy}","received_events_url":"https://api.github.com/users/emmanueltouzery/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/commercialhaskell/stack/milestones/8","html_url":"https://github.com/commercialhaskell/stack/milestones/Support","labels_url":"https://api.github.com/repos/commercialhaskell/stack/milestones/8/labels","id":1208081,"number":8,"title":"Support","description":"Issues without clear work items for the codebase","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":22,"closed_issues":174,"state":"open","created_at":"2015-07-14T20:38:48Z","updated_at":"2016-07-20T02:44:02Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-07-09T08:24:58Z","updated_at":"2016-07-20T05:59:04Z","closed_at":"2016-07-19T22:35:43Z","body":"I took the habit of managing my post-install setup things in the `Setup.hs`. The advantages are clear: it's coded in haskell, and it has access to the app data directory, where the binary will get installed.\r\n\r\nI'm using it now for instance, to copy the QML data files and icons that a haskell QML application needs to the installation folder.\r\n\r\nMy issue is with stack optimizing the build with dirty checking, and if it detects that no haskell files changed, it won't re-trigger the Setup.hs. That obviously doesn't work for me, because I'd like my QML files and icons to get copied every time I run stack install during development. stack is so smart that not even touch Setup.hs or of another .hs file helps to re-trigger its execution. I must physically change the contents of one file.\r\n\r\nI can't find a flag for stack that would trigger just the Setup.hs and nothing else (or little else; certainly `clean` and `--reconfigure` force rebuilding too many things).\r\n\r\nShould I write a shell script? I found I could leverage `stack path` to get the installation folder, but it's less portable that the haskell in my Setup.hs, and haskell is nicer...\r\n\r\nMaybe it could make sense to add a new flag in stack to just re-run the `postBuild` hook in the Setup.hs? Something like `--force-setup-postbuild`?"},"comment":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/comments/233845233","html_url":"https://github.com/commercialhaskell/stack/issues/2357#issuecomment-233845233","issue_url":"https://api.github.com/repos/commercialhaskell/stack/issues/2357","id":233845233,"user":{"login":"emmanueltouzery","id":339433,"avatar_url":"https://avatars.githubusercontent.com/u/339433?v=3","gravatar_id":"","url":"https://api.github.com/users/emmanueltouzery","html_url":"https://github.com/emmanueltouzery","followers_url":"https://api.github.com/users/emmanueltouzery/followers","following_url":"https://api.github.com/users/emmanueltouzery/following{/other_user}","gists_url":"https://api.github.com/users/emmanueltouzery/gists{/gist_id}","starred_url":"https://api.github.com/users/emmanueltouzery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmanueltouzery/subscriptions","organizations_url":"https://api.github.com/users/emmanueltouzery/orgs","repos_url":"https://api.github.com/users/emmanueltouzery/repos","events_url":"https://api.github.com/users/emmanueltouzery/events{/privacy}","received_events_url":"https://api.github.com/users/emmanueltouzery/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T05:59:04Z","updated_at":"2016-07-20T05:59:04Z","body":"`--force-dirty` also forces rebuilding a lot of things. I understand I'm asking a support question at this point, but I tried on [stackoverflow](http://stackoverflow.com/questions/38250173/re-running-setup-hs-and-change-detection) and [the stack mailing list](https://groups.google.com/forum/#!topic/haskell-stack/Vj-9j8P4nek). I'm not sure how to handle this with `stack`. Maybe a turtle script separate from the app, so that I don't have to write a shell script? I feel currently stack doesn't cater for this use-case, there must be a solution that I don't see."}}
{"actor":{"display_login":"emmanueltouzery"}}