Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.
This repository was 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

Description

@nh2

.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions