Open zimbatm opened 1 year ago
Describe the bug
The cache is stored in ~/.cache/treefmt/<hash-of-project.toml-path>.toml (see https://github.com/numtide/treefmt/blob/e51789fe1ed92795c0ba89ca7c74c34acd8b95ca/src/eval_cache.rs#L203) With treefmt-nix, the config file gets a new path on every config change, invalidating the cache entirely.
~/.cache/treefmt/<hash-of-project.toml-path>.toml
A better solution would be to use the projectRoot path as a cache key.
I don't believe this is an issue in v2 any more, but I need to double check.
Describe the bug
The cache is stored in
~/.cache/treefmt/<hash-of-project.toml-path>.toml
(see https://github.com/numtide/treefmt/blob/e51789fe1ed92795c0ba89ca7c74c34acd8b95ca/src/eval_cache.rs#L203) With treefmt-nix, the config file gets a new path on every config change, invalidating the cache entirely.A better solution would be to use the projectRoot path as a cache key.