{"action":"created","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/4360","repository_url":"https://api.github.com/repos/commercialhaskell/stack","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/4360/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/4360/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/4360/events","html_url":"https://github.com/commercialhaskell/stack/issues/4360","id":370797003,"node_id":"MDU6SXNzdWUzNzA3OTcwMDM=","number":4360,"title":"qAddDependentFile doesn't cause re-compilation without extra-source-files","user":{"login":"pbrisbin","id":50812,"node_id":"MDQ6VXNlcjUwODEy","avatar_url":"https://avatars3.githubusercontent.com/u/50812?v=4","gravatar_id":"","url":"https://api.github.com/users/pbrisbin","html_url":"https://github.com/pbrisbin","followers_url":"https://api.github.com/users/pbrisbin/followers","following_url":"https://api.github.com/users/pbrisbin/following{/other_user}","gists_url":"https://api.github.com/users/pbrisbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pbrisbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbrisbin/subscriptions","organizations_url":"https://api.github.com/users/pbrisbin/orgs","repos_url":"https://api.github.com/users/pbrisbin/repos","events_url":"https://api.github.com/users/pbrisbin/events{/privacy}","received_events_url":"https://api.github.com/users/pbrisbin/received_events","type":"User","site_admin":false},"labels":[{"id":414685075,"node_id":"MDU6TGFiZWw0MTQ2ODUwNzU=","url":"https://api.github.com/repos/commercialhaskell/stack/labels/component:%20build","name":"component: build","color":"bfdadc","default":false},{"id":205827131,"node_id":"MDU6TGFiZWwyMDU4MjcxMzE=","url":"https://api.github.com/repos/commercialhaskell/stack/labels/type:%20bug","name":"type: bug","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-10-16T20:58:43Z","updated_at":"2018-10-25T12:39:28Z","closed_at":null,"author_association":"NONE","body":"\r\n\r\n### Steps to reproduce\r\n\r\n1. Set up a repro project with `stack new --bare repro`\r\n1. Add a file `templates/example.hamlet`\r\n\r\n   ```html\r\n   <h1>Hi\r\n   ```\r\n\r\n1. Update `Lib.hs` to\r\n\r\n   ```hs\r\n   {-# LANGUAGE TemplateHaskell #-}\r\n\r\n   module Lib\r\n      ( someFunc\r\n      ) where\r\n\r\n   import Text.Blaze.Html.Renderer.Pretty\r\n   import Text.Hamlet\r\n\r\n   someFunc :: IO ()\r\n   someFunc = putStrLn $ renderHtml $(shamletFile \"templates/example.hamlet\")\r\n   ```\r\n\r\n   (Add the `shakespeare`and `blaze-html` dependencies as necessary.)\r\n\r\n1. Start up `stack build --file-watch`\r\n\r\n1. Modify the contents of `templates/example.hamlet`\r\n\r\n### Expected\r\n\r\nModifying `templates/example.hamlet` should trigger re-compilation.\r\n\r\n### Actual\r\n\r\nIt does not. However, if I add\r\n\r\n```yaml\r\nextra-source-files:\r\n  - templates/*\r\n```\r\n\r\nTo `package.yaml`, it works as expected. This should not be necessary as this packaging field is only documented as related to including files in `sdist`, not as a requirement for `qAddDependentFile` to work.\r\n\r\n### Stack version\r\n\r\n```\r\n$ stack --version\r\nVersion 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2\r\n```\r\n\r\n### Method of installation\r\n\r\nhttps://aur.archlinux.org/packages/stack-static/\r\n\r\n### Notes\r\n\r\nIt's definitely an assumption on my part that this boils down to `qAddDependentFile`. So I apologize if that's not actually the case. Another way to phrase it could be, _external files referenced in TemplateHaskell don't cause re-compilation..._.\r\n\r\nI've reproduced this bug with pretty much every file-reading TH function in a standard Yesod app (`parseRoutesFile`, `widgetFile`, etc).\r\n\r\nI wouldn't have guessed this was Stack's responsibility either, but `cocreature` in `#haskell` encouraged me to report this bug here."},"comment":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/comments/433034372","html_url":"https://github.com/commercialhaskell/stack/issues/4360#issuecomment-433034372","issue_url":"https://api.github.com/repos/commercialhaskell/stack/issues/4360","id":433034372,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzAzNDM3Mg==","user":{"login":"tolysz","id":623362,"node_id":"MDQ6VXNlcjYyMzM2Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/623362?v=4","gravatar_id":"","url":"https://api.github.com/users/tolysz","html_url":"https://github.com/tolysz","followers_url":"https://api.github.com/users/tolysz/followers","following_url":"https://api.github.com/users/tolysz/following{/other_user}","gists_url":"https://api.github.com/users/tolysz/gists{/gist_id}","starred_url":"https://api.github.com/users/tolysz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tolysz/subscriptions","organizations_url":"https://api.github.com/users/tolysz/orgs","repos_url":"https://api.github.com/users/tolysz/repos","events_url":"https://api.github.com/users/tolysz/events{/privacy}","received_events_url":"https://api.github.com/users/tolysz/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T12:39:28Z","updated_at":"2018-10-25T12:39:28Z","author_association":"COLLABORATOR","body":"@ygale only the version `shakespeare-2.0.19`+ will report it."}}
{"actor":{"display_login":"tolysz"}}