You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since prjfmt is responsible for traversing the filesystem, it can also keep track of the mtimes of each file during the classification. By doing so, it's possible to not re-format files that haven't changed.
The project needs to be changed to:
Load a cache file if it exists. The location should be $XDG_CACHE_DIR/prjfmt/eval-cache/<hex(hash(path))>.toml where path is the path to the prjfmt.toml file.
When traversing the filesystem, compare to the cache and remove all the files that haven't changed.
After formatting, check again the mtimes of the files that have been potentially touched. Update the cache with all the files.
The text was updated successfully, but these errors were encountered:
A great idea by @Rizary.
Since
prjfmt
is responsible for traversing the filesystem, it can also keep track of the mtimes of each file during the classification. By doing so, it's possible to not re-format files that haven't changed.The project needs to be changed to:
Load a cache file if it exists. The location should be
$XDG_CACHE_DIR/prjfmt/eval-cache/<hex(hash(path))>.toml
wherepath
is the path to the prjfmt.toml file.When traversing the filesystem, compare to the cache and remove all the files that haven't changed.
After formatting, check again the mtimes of the files that have been potentially touched. Update the cache with all the files.
The text was updated successfully, but these errors were encountered: