Skip to content

Commit

Permalink
contributing: recommend bacon over cargo-watch
Browse files Browse the repository at this point in the history
As of [1], `cargo-watch` is on minimal development and officially
recommends `bacon` as a successor.

[1]: watchexec/cargo-watch@9f27bc1,
  • Loading branch information
bryceberger committed Jan 9, 2025
1 parent cba1966 commit 84e619c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,13 @@ One-time setup:

rustup toolchain add nightly # wanted for 'rustfmt'
rustup toolchain add 1.76 # also specified in Cargo.toml
cargo install cargo-insta
cargo install cargo-watch
cargo install cargo-nextest
cargo install --locked bacon
cargo install --locked cargo-insta
cargo install --locked cargo-nextest

During development (adapt according to your preference):

cargo watch --ignore '.jj/**' -s \
'cargo clippy --workspace --all-targets \
&& cargo +1.76 check --workspace --all-targets'
bacon clippy-all
cargo +nightly fmt # Occasionally
cargo nextest run --workspace # Occasionally
cargo insta test --workspace --test-runner nextest # Occasionally
Expand Down Expand Up @@ -178,9 +176,8 @@ These are listed roughly in order of decreasing importance.
4. Your code needs to pass `cargo clippy`. You can also
use `cargo +nightly clippy` if you wish to see more warnings.

5. You may also want to install and use `cargo-watch`. In this case, you should
exclude `.jj`. directory from the filesystem watcher, as it gets updated on
every `jj log`.
5. You may also want to install and use [`bacon`](https://dystroy.org/bacon/),
to automatically build, check, and / or run tests.

6. To run tests more quickly, use `cargo nextest run --workspace`. To
use `nextest` with `insta`, use `cargo insta test --workspace
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@
pkg-config

# Additional tools recommended by contributing.md
bacon
cargo-deny
cargo-insta
cargo-nextest
cargo-watch

# Miscellaneous tools
watchman
Expand Down

0 comments on commit 84e619c

Please sign in to comment.