Skip to content
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

cache gets busted on treefmt-nix config changes #216

Open
zimbatm opened this issue Jan 31, 2023 · 1 comment
Open

cache gets busted on treefmt-nix config changes #216

zimbatm opened this issue Jan 31, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@zimbatm
Copy link
Member

zimbatm commented Jan 31, 2023

Describe the bug

The cache is stored in ~/.cache/treefmt/<hash-of-project.toml-path>.toml (see

let treefmt_hash = Sha1::digest(path_bytes.as_bytes());
) 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.

@zimbatm zimbatm added the bug Something isn't working label Jan 31, 2023
@brianmcgee
Copy link
Member

I don't believe this is an issue in v2 any more, but I need to double check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants