I had to remove the evaluation cache and parallel formatting for now in
order to make this manageable.
* Load the config
* Prepare for filesystem traversal
* Match each path against the formatters and collect the ones that
match. Get the mtime from the traversal entry to avoid additional
syscalls.
* Now that we have a map from formatter to paths, run each formatter
against its list. Collect a list of new mtimes.
* Finally display the list of files that have changed.
path-absolutize's absolutize_virtually was actually failing if path is
already absolute and not under the reference directory. But we just want
to expand the path and make sure it's absolute and clean.
Since we do a lot of path manipulation, with commands changing
directories and whatnot. It's probably easier to work with only absolute
paths.
If we can guarantee that, the rest will become easier.
`criterion` is a powerful benchmark crate that works on rust stable.
This commit sets up a basic benchmark to get things started and
understand the performance of the program better.
* adding working directory option on prjfmt.toml for each formatter
* rename workdir into work_dir
* switch from xshell into process::Command
* fix unordered command_context by changing to BTreeMap
* adding an command to add/check
* Make cargo fmt working on rust folder
* fix the build with `nix develop -i`
Co-authored-by: zimbatm <zimbatm@zimbatm.com>