-
Notifications
You must be signed in to change notification settings - Fork 846
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
Respect TemplateHaskell addDependentFile dependency changes #105
Comments
I just did some research on this, and the way to handle this is to call |
Here's my intended approach to working on this. When formulating a build plan (a specific arch, ghc, lts are selected)
As I understand it, the build cache should smoothly take it from there, as long as we tell it about these extra files. Some nuances and thoughts regarding:
I might stub out the "module dependencies" part (3.2) if it is tricky. |
One shortcoming of this approach is that it only works for a library target. I can't find the |
Never mind. The .hi file appears to be in |
Package files are gotten in |
Other notes:
|
We need to also consider performance here. Having GHC dump the contents of On Thu, Jul 16, 2015, 11:01 AM Dan Burton notifications@github.com wrote:
|
Discussion in PR #734. |
This still seems to be happening for multiple-package projects. |
I'm still experiencing this issue with a trivial single-executable project. I've uploaded a simple reproduction. |
That repro actually works correctly on my machine.
…On Sat, Jun 17, 2017 at 5:27 AM, Rhys ***@***.***> wrote:
I'm still experiencing this issue with a trivial single-executable
project. I've uploaded a simple reproduction
<https://github.com/rimmington/stack-gitrev-repro>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADBB5M0F_C4uB1fPYe8JUYaeQd3my6cks5sEzmogaJpZM4EuiPP>
.
|
The example doesn't work correctly on my machine, if the correct |
You're right, I was getting confused by the repo. Nonetheless, the bug isn't in Stack, it's in gitrev, which seems to be mishandling whitespace. I'll open up an issue. (This is also why we generally ask for minimal reproducing test cases, to ensure that the bug is really in Stack and not some other library.) |
These were uncovered when researching commercialhaskell/stack#105. What I discovered: * There was an extra layer of `.git` directories in computed paths * The HEAD file should be added dependently regardless of whether it's a detached head * Add a missing check in relRef for newline * Switch newline handling to check both CR and LR for Windows support
My apologies for the poor quality of the repro. The gitrev PR fixes this issue for me. |
No worries
…On Mon, Jun 19, 2017, 3:24 AM Rhys ***@***.***> wrote:
My apologies for the poor quality of the repro.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADBB_qAPvoUG902spp8Tmc9PMOeTnUVks5sFb_NgaJpZM4EuiPP>
.
|
Possibly relevant for people who read this issue: acfoltzer/gitrev#17
|
I'm thinking this whole git logic might sit much better in a But a question @snoyberg / @DanBurton: If such a hook was used, would that still work with stack's own recompilation avoidance? Because if stack doesn't run things like |
No idea, I've never really understood how user hooks are triggered in Cabal. But I'd stay far away from a solution that uses any kind of custom Setup.hs file. I'd rather just recompile every module every time I hit build than that (only half exaggerating). |
As far as I can tell,
@snoyberg This is literally what's happening for me when using only TH and no hook, but I'm having a hard time with it because it just makes iterating so slow. So right now I'm in favour of the hook. |
@mgsloan Has confirmed in chat with me that indeed stack's own recompilation avoidance will prevent hooks from running if files on disk didn't change. That means that right now, using only a |
More discussion: @mgsloan Right now when using Because I think the solution would be to put @mgsloan said:
|
For example, when building
stack
itself.stack build
stack build
What should happen:
What currently happens:
The text was updated successfully, but these errors were encountered: