Convert as much scripts as possible to xtask
- Dominant language
- Rust
- Stars
- 188
- Forks
- 41
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 12
Description
The shell scripts start to get more/too complex. We should migrate them to xtask as modules (or even libraries). Ideally, the only remaining script would be `setup.sh` to install enough things for xtask to run (probably rustup and build-essential).
Can use [cargo_toml](https://crates.io/crates/cargo_toml) to parse `Cargo.toml` files. Description of configurations for `cargo check` and `cargo test` (from which `cargo clippy` are derived) can be in `package.metadata` like for `package.metadata.docs.rs` from which `cargo doc` is derived. Note that `cargo fmt` is always the same.
Other useful crates: [git2](https://crates.io/crates/git2), [semver](https://crates.io/crates/semver).
Related tasks:
- #448
- #583
We might want to also make use of [cargo-script](https://rust-lang.github.io/rust-project-goals/2024h2/cargo-script.html) to keep the script feeling.
In addition to the logic in `ci-changelog.sh` regarding `Cargo.toml` files, an additional rule should be that `publish = false` crate should not use `version` in local dependencies (i.e. with `path`).
Another rule could be that optional dependencies should not define any features. The features should be added by the features that enable the dependency.
Contributor guide
Assessment
This issue has not been assessed yet.