New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Cassius, Lucius reload mode #207
Conversation
@alx741 Are you sure this is a right fix ? I think you should just remove the directives and |
@psibi well, Is there perhaps a reason to keep Edit: According to my reasoning removing the directives wouldn't do much, as GHC is going to be >= 7.4 in most cases, plus I think the reason for that restriction is that |
Why do you think Only if you add files as compilation dependencies, they will get re-compiled IIRC. |
Whenever This way changes in template files mark the invoking Haskell file for recompilation when the normal versions are used, but doesn't when the reload versions are used. Notice how this is the behavior for |
@snoyberg that's the part that intrigues me though, as far as i understand it, it should be reproducible as long as that |
I checked in my .hi files, I also have the lucius/cassius files listed. I don't know why on my system Stack isn't rebuilding for them. Maybe it's a bug in the devel version of Stack. In any event, the .hi files are authoritative here. |
On the other hand... those 3 lines seem to be there for about 5 years now. Either my reasoning about them is incorrect, or there is something weird going on somewhere else. |
LGTM. @alx741 Does removing this line actually fixes the problem for you ? |
@psibi oh yeah! it did. I tried with a standalone executable that loads a cassius file (with reload mode), and both in an existing Yesod project and a freshly scaffolded one. The needless recompilation is gone in all of them :) |
Fix #206
Fix yesodweb/yesod#1425