Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Document the fact that addDependentFile on .git/index can lead to unnecessary recompilation #17

Open
nh2 opened this issue Feb 7, 2018 · 0 comments

Comments

@nh2
Copy link

nh2 commented Feb 7, 2018

.git/index doesn't only contain the textual information of git status --porcelain in binary, but in fact it contains the mtimes of all files in it (updated when git status is run).

That means we will see this file changed by simple things as touch and because of addDependentFile on it recompile modules even if nothing changed. Because of the [TH] recompile reason introduced into GHC, this can lead to a lot of modules recompiling with [TH] reason.

In detail, right now it's all modules that ((import the module where gitrev is used) AND (use TH splices)), and this recursively. (I have a patch to GHC here that may reduce this by killing the "recursive" bit, and it could be reduced to only the module that uses gitrev if TemplateHaskell was made smarter, but right now that isn't the case.)

I don't currently see a way around this using TemplateHaskell, so we should simple document this fact.b

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant