[ENH] Find alternative to `pre-commit-rust`
Is your feature request related to a problem? Please describe.
I would like the pre-commit hook to run cargo test and cargo +nightly fmt so that we can format imports. These features are not implemented in pre-commit-rust, and the project seems to be unmaintained (last commit is more than 2 years ago).
There is a PR for supporting cargo test (https://github.com/doublify/pre-commit-rust/pull/25) and an issue for supporting +nightly (https://github.com/doublify/pre-commit-rust/issues/15).
Describe the solution you'd like
One option would be to fork the repo. I don't know what other solutions exist for the pre-commit tool we are using.
Describe alternatives you've considered None
Additional context None
@charlesbluca fyi
Thanks for the ping @andygrove - agree that an alternative to pre-commit-rust would allow us to have a lot more flexibility in terms of running cargo commands as part of CI, and I don't imagine it being too difficult.
The biggest blocker I foresee here (which I've been discussing with @ayushdg) is switching over our CI and documentation to encourage the use of rustup over the conda Rust package, so that users have access to the same pre-commit environment that we are using in CI (which presumably would include nightly Rust) - I can start looking into that
@andygrove if you test as well with nightly toolchain, it's easier to set specfic toolchain as default.
This issue is pretty outdated now, the solution we ended up going with here was encouraging direct install of rustup rather than the conda packages and then using +nightly for the import formatting:
- https://github.com/dask-contrib/dask-sql/pull/817
- https://github.com/dask-contrib/dask-sql/pull/819
There is still the issue of pre-commit-rust being unmaintained though, so it might be worth moving some of our remaining pre-commit checks either to a fork of the repo or to local hooks.
I'd like to create pre-commit-rust from the scratch. May I invite you to discuss requirements?