v0.35.0
What's changed
In this release:
- 10 new lints
- performance upgrades
- improved bug reporting UX & test infra
This release requires Rust 1.77+ both to install (MSRV) and at runtime.
New lints:
We can now detect whether a trait is sealed or not, unlocking many new lints! "Is this lint sealed" is a tricky question full of edge cases — check out our deep-dive into this feature to learn more!
trait_newly_sealedby @dmatos2012 in #876trait_method_addedby @PedroTurik in #891trait_method_default_impl_removedby @dmatos2012 in #880trait_associated_type_addedby @PedroTurik in #890trait_associated_const_addedby @mrnossiom in #875trait_associated_type_default_removedby @mrnossiom in #889trait_associated_const_default_removedby @mrnossiom in #888enum_unit_variant_changed_kindby @PedroTurik in #894enum_tuple_variant_changed_kindby @PedroTurik in #906
Additionally, we enabled the trait_no_longer_object_safe lint. It was previously implemented but was disabled while awaiting updated Rust functionality.
We also renamed the variant_marked_non_exhaustive lint to enum_variant_marked_non_exhaustive, for better naming consistency.
Performance upgrades
cargo-semver-checks lints are implemented as database queries. The "database" in our case is rustdoc JSON files, which we load in memory and index for faster lookups. For particularly large crates, this indexing process could take up to 2-3 seconds by itself.
This release cuts the indexing time in half, thanks to the work of @jalil-salame:
- using rayon to parallelize index construction: adapter#424, adapter#418, adapter#405
- a faster hash function: adapter#423
- reducing indirections and hash calls: adapter#435, adapter#404
Improved bug reporting UX & test infra
Our GitHub bug reporting form requests the diagnostic output of the cargo semver-checks --bugreport command. That output is unwieldy, so it's a bit of a hassle to copy-paste it into the GitHub issue UI.
As of this release, --bugreport will include a URL that pre-fills all the diagnostic information into a GitHub bug report form. Now you can just click the link, and skip the clunky copy-pasting! Thanks to @PedroTurik for shipping this functionality in #862.
@suaviloquence has also been hard at work revamping our test infrastructure so that we can test cargo-semver-checks more thoroughly and in more configurations. He's already shipped a dozen PRs that have made us more confident in our ability to build bigger and bolder features. Skyskrapers cannot stand on wobbly foundations, so keep his hard work in mind while you enjoy the powerful new features we'll be shipping in the months to come!
All Merged PRs
- Update MSRV in Cargo.toml, which did not match docs. by @obi1kenobi in #854
- Fail Rust matrix updater job if the file we want is missing. by @obi1kenobi in #858
- Re-enable the
trait_no_longer_object_safelint. by @obi1kenobi in #857 - Ensure all lints in
src/lintsare registered for use at runtime. by @obi1kenobi in #860 - adds ids to text areas in bug reports by @PedroTurik in #861
- Add snapshot testing with
instaby @suaviloquence in #846 - add no lib targets test by @suaviloquence in #847
- Add test for when all members in a workspace are
publish = falseby @suaviloquence in #859 - Update FUNDING.yml to add thanks.dev by @obi1kenobi in #864
- Forward verbosity and filter time out of snapshot tests by @suaviloquence in #865
- Filter total # of checks and filenames in snapshots by @suaviloquence in #867
- Add tests for
publish = falseworkspace members explicitly included with--packageby @suaviloquence in #866 - Drop rustdoc v27 support. by @obi1kenobi in #869
- Weekly
cargo updateof dependencies by @obi1kenobi in #871 - Allow generating test rustdoc JSON files without git dependency. by @obi1kenobi in #856
- Update to adapter w/ sealed trait analysis & update lints to match. by @obi1kenobi in #872
- fix: regenerate script toplevel resolution by @mrnossiom in #873
cargo updateto grab new rustdoc adapter with function body ability. by @obi1kenobi in #874- Implement trait_newly_sealed new lint by @dmatos2012 in #876
- Upgrade gix and tame-index to new versions in lock-step. by @obi1kenobi in #877
- Upgrade handlebars to new major version. by @obi1kenobi in #878
- Bugreport auto issue by @PedroTurik in #862
- snapshot tests: save captured stdout/err even on an Err variant by @suaviloquence in #881
- snapshot tests: reproducibility for
cargo docby @suaviloquence in #883 - Add snapshot test for when a workspace member's baseline has a compile error. by @suaviloquence in #882
- add lint
trait_associated_const_addedby @mrnossiom in #875 - Add lint for trait default impl removed by @dmatos2012 in #880
- Weekly
cargo updateof dependencies by @obi1kenobi in #886 - Add handling of ambiguous package definitions within the same dir. by @obi1kenobi in #887
- feat: add trait_associated_const_default_removed lint by @mrnossiom in #888
- non-sealed trait added associated type without default value lint by @PedroTurik in #890
- feat: add trait_associated_type_default_removed lint by @mrnossiom in #889
- adds new trait-method-added lint by @PedroTurik in #891
- enable
implicit somefeature on query rons. by @suaviloquence in #897 - Make verbosity a global option by @suaviloquence in #899
- Explicitly
cargo updatein path dependency workspaces. by @obi1kenobi in #901 - Invoke
cargo updateon path dependencies, not registry ones. by @obi1kenobi in #904 - Properly silence cargo output unless
--verbose. by @obi1kenobi in #903 - Enum unit variant changed kind by @PedroTurik in #894
- Enum tuple variant changed kind by @PedroTurik in #906
- Disable tests currently broken by #902. by @obi1kenobi in #907
- Add integration test snapshots by @suaviloquence in #905
- Rename
variant_marked_non_exhaustivetoenum_variant_marked_non_exhaustive. by @obi1kenobi in #908 - Weekly
cargo updateof dependencies by @obi1kenobi in #900 - Rename
trait_default_impl_removedtotrait_method_default_impl_removedby @obi1kenobi in #909 - Weekly
cargo updateof dependencies by @obi1kenobi in #910 - Release v0.35.0. by @obi1kenobi in #911
New Contributors
- @mrnossiom made their first contribution in #873
- @dmatos2012 made their first contribution in #876
Full Changelog: v0.34.0...v0.35.0