Skip to content

v0.36.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 18 Oct 14:43
· 2 commits to main since this release
cc74071

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

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

New Contributors

Full Changelog: v0.35.0...v0.36.0