v0.36.0
What's changed
We're debuting a new "Spotlight" section in the release notes! We'll use it to shine a spotlight at aspects of cargo-semver-checks that don't usually get flashy headlines, even though they play a critical role.
In this release:
- Spotlight: Supporting many Rust versions at once
- 5 new lints (94 total, who will add lint number 💯?)
- Performance upgrades
- Support for comma-separated feature lists
This release requires Rust 1.77+ both to install (MSRV) and at runtime. Future releases will require Rust 1.80+.
Spotlight: Supporting many Rust versions at once
cargo-semver-checks uses the JSON output of Rust's rustdoc
tool to analyze your APIs. This JSON format is not stable: between the release of Rust 1.77 on March 21, 2024 and today, we've had 9 mutually-incompatible format versions. That's more than one per month!
Most tools that rely on rustdoc JSON support only a single rustdoc format at a time. The user is required to install the version of the tool that matches the rustdoc format their Rust version provides. This works, but at the cost of pushing extra complexity onto the users.
Instead, we wanted to offer a seamless experience: use reasonably new Rust and newer cargo-semver-checks, and everything just works! Pulling this off required declarative queries, cutting-edge database technology, and the Trustfall query engine, and were described in depth in UA Rust 2024 and RustConf 2024 talks. The talk videos aren't online yet, so please follow along on social media (bsky, Mastodon, Twitter) or by subscribing to blog posts to make sure you don't miss them when they come out ✨
Today's cargo-semver-checks supports all stable Rust versions 1.77-1.82, as well as 1.83 beta and the most recent nightly. Today we set a new record in how many rustdoc formats we support at once! All the maintenance required to make this work is a challenge, and we are grateful to our GitHub Sponsors for supporting this work 💖
New lints
enum_no_repr_variant_discriminant_changed
by @dmatos2012 in #912struct_with_no_pub_fields_changed
by @CommanderStorm in #962struct_marked_non_exhaustive_changed_type
by @CommanderStorm in #963declarative_macro_missing
by @miikka in #966trait_added_supertrait
by @mrnossiom in #892
We're now at 94 lints! Who is going to add lint number 💯?
Performance upgrades
In any reasonably well-optimized system, ongoing performance wins usually come in the form of "5% here, 10% there" rather than "10x with this one weird trick." This is now true for cargo-semver-checks as well.
In coordination with the Rust project's T-rustdoc team, and with the tireless efforts of @jalil-salame, cargo-semver-checks users now benefit from:
- ~6-7% smaller rustdoc JSON files, which consume less disk space to cache and are ~28% faster to load
- more compact indexes which are ~12% faster to build
This translates to up to ~0.8s time savings for our largest projects, and even more speedup on resource-constrained CI hardware where disk and network I/O are usually much slower than on a desktop machine.
Support for comma-separated feature lists
Previously, our CLI did not support specifying multiple features as a comma-separated list — the following did not work:
cargo semver-checks --features foo,bar
Instead, users had to specify each feature separately, which was quite tedious:
cargo semver-checks --features foo --features bar
Thanks to @dmatos2012, the --features
, --baseline-features
, and --curent-features
CLI options now all support comma-separated lists. What a lovely user experience win!
All Merged PRs
- Filter versions in lint reference links in snapshots by @suaviloquence in #913
- Functionality for unstable feature flags and options by @suaviloquence in #896
- Add next Rust minor to test matrix by @obi1kenobi in #917
- Add support for specifying features with commas
feat1,feat2
by @dmatos2012 in #918 - Encapsulate query deserializing logic by @suaviloquence in #919
- Weekly
cargo update
of dependencies by @obi1kenobi in #920 - Weekly
cargo update
of dependencies by @obi1kenobi in #921 - Enable the
rayon
andrustc-hash
optimization features. by @obi1kenobi in #924 - Weekly
cargo update
of dependencies by @obi1kenobi in #925 - Weekly
cargo update
of dependencies by @obi1kenobi in #929 cargo upgrade --incompatible
across all versions. by @obi1kenobi in #931- Handle
priority
in the lints table by @suaviloquence in #932 - add witness template to lints by @suaviloquence in #893
- change
function_missing
witness hint by @suaviloquence in #934 - Add enum variant discriminant changed lint by @dmatos2012 in #912
- use
insta
for witness tests by @suaviloquence in #935 - Document contributor process for adding witness hint templates by @suaviloquence in #933
- Reduce size of uploaded crate by @DaniPopes in #936
- change log callbacks to
FnOnce
by @suaviloquence in #938 - feat: add
trait_added_supertrait
by @mrnossiom in #892 - Weekly
cargo update
of dependencies by @obi1kenobi in #942 - Add LSP setup information to CONTRIBUTING.md file by @obi1kenobi in #941
- Weekly
cargo update
of dependencies by @obi1kenobi in #947 - Improve
union_field_missing
query formatting. by @obi1kenobi in #948 - Weekly
cargo update
of dependencies by @obi1kenobi in #958 - docs: add
<details>
to theCONTRIBUTING.md
to make some content visually shorter by @CommanderStorm in #952 - Bump mozilla-actions/sccache-action from 0.0.5 to 0.0.6 by @dependabot in #955
- Reword doc comment that had too long of a first paragraph. by @obi1kenobi in #959
- test: migrate the remaining snapshot-test to
insta
by @CommanderStorm in #951 - feat: add lint
struct_with_no_pub_fields_changed
by @CommanderStorm in #962 - Weekly
cargo update
of dependencies by @obi1kenobi in #964 - fixed a typo in
NoneExhaustiveFieldlessUnit
by @CommanderStorm in #965 - Weekly
cargo update
of dependencies by @obi1kenobi in #967 - Weekly
cargo update
of dependencies by @obi1kenobi in #969 - Weekly
cargo update
of dependencies by @obi1kenobi in #970 - Add lint
declarative_macro_missing
by @miikka in #966 cargo clippy --fix
for the latest lints. by @obi1kenobi in #972- feat: add lint
struct_marked_non_exhaustive_changed_type
by @CommanderStorm in #963 - Add next Rust minor to test matrix by @obi1kenobi in #974
- feat: add witnesses for
function_const_removed
by @CommanderStorm in #977 - Add support for rustdoc JSON format v36. by @obi1kenobi in #979
- Update
tame-index
to v0.14. by @obi1kenobi in #980 - chore: add a witness for
enum_variant_missing
by @CommanderStorm in #978 - Weekly
cargo update
of dependencies by @obi1kenobi in #981 - Release v0.36 with 5 new lints, perf boosts, and new rustdoc formats. by @obi1kenobi in #982
New Contributors
- @DaniPopes made their first contribution in #936
- @CommanderStorm made their first contribution in #952
- @miikka made their first contribution in #966
Full Changelog: v0.35.0...v0.36.0