Releases: obi1kenobi/cargo-semver-checks
v0.30.0
What's Changed
In this release: 7 new lints + assorted UX improvements. This release requires Rust 1.74+ both to install (MSRV) and at runtime.
New lints:
union_now_doc_hidden
by @vasucp1207 (#679)trait_method_now_doc_hidden
by @suaviloquence (#684)enum_tuple_variant_field_now_doc_hidden
by @arpity22 (#685)enum_struct_variant_field_now_doc_hidden
by @arpity22 (#687)function_abi_no_longer_unwind
by @qstommyshu (#689)pub_module_level_const_now_doc_hidden
by @arpity22 (#690, #703)repr_c_removed
lint covering all struct/enum/union types, by @pksunkara (#678)- This lint augments and replaces the previous
struct_repr_c_removed
andenum_repr_c_removed
lints.
- This lint augments and replaces the previous
Miscellaneous:
- Improved output of reproduction command when failing to generate rustdoc JSON, by @obi1kenobi (#676)
- Improved new-contributor workflow for better compatibility across platforms, by @jw013 (#681, #682, #683)
- Better description and tests for
inherent_method_must_use_added
lint, by @pksunkara (#677) - Faster compilation times by deduplicating major dependency versions and major dependency version bumps where possible (many PRs, see below)
All Merged PRs
- Output complete repro command when failing to generate rustdoc JSON. by @obi1kenobi in #676
- rule: add
union_now_doc_hidden
by @vasucp1207 in #679 - Fix description and tests for inherent_method_must_use_added by @pksunkara in #677
- Replace per-type
repr(C)
lints with a single lint for all of struct/enum/union by @pksunkara in #678 - Update scripts and contributing guide by @jw013 in #681
- Replace GNU-specific commands with more portable alternatives by @jw013 in #682
- Remove script usage of globstar, improving compatibility by @jw013 in #683
- add trait_method_now_doc_hidden lint by @suaviloquence in #684
- Added lint enum_tuple_variant_field_now_doc_hidden by @arpity22 in #685
- Raise compile-time and runtime MSRV to Rust 1.74. by @obi1kenobi in #686
- Weekly
cargo update
of dependencies by @obi1kenobi in #673 - Added lint enum_struct_variant_field_now_doc_hidden by @arpity22 in #687
- Update
tame_index
andgix
to new major versions. by @obi1kenobi in #691 - Update cargo and toml-related dependencies. by @obi1kenobi in #692
- Update
handlebars
to new major version. by @obi1kenobi in #693 - Update dev dependency major versions. by @obi1kenobi in #694
- Remove
lazy_static
from dev dependencies. by @obi1kenobi in #695 - Update
itertools
to v0.12 by @obi1kenobi in #696 - Set up dependabot updates to GitHub Actions. by @obi1kenobi in #697
- Added lint public_module_level_constant_now_doc_hidden by @arpity22 in #690
- Bump mozilla-actions/sccache-action from 0.0.3 to 0.0.4 by @dependabot in #698
- Bump actions/checkout from 3 to 4 by @dependabot in #702
- Bump actions/upload-artifact from 3 to 4 by @dependabot in #699
- Bump actions/download-artifact from 3 to 4 by @dependabot in #700
- Bump actions/cache from 3 to 4 by @dependabot in #701
- Rename new lint to
pub_module_level_const_now_doc_hidden
. by @obi1kenobi in #703 - Set dependabot to weekly runs. by @obi1kenobi in #704
- New lint: add function_abi_no_longer_unwind lint by @qstommyshu in #689
- Update dependencies in preparation for release. by @obi1kenobi in #705
- Release v0.30 with Rust 1.74+ MSRV and many new lints. by @obi1kenobi in #706
New Contributors
- @vasucp1207 made their first contribution in #679
- @pksunkara made their first contribution in #677
- @suaviloquence made their first contribution in #684
- @arpity22 made their first contribution in #685
- @dependabot made their first contribution in #698
- @qstommyshu made their first contribution in #689
Full Changelog: v0.29.1...v0.30.0
v0.29.1
Just a small maintenance release, to avoid a yanked dependency version that was in our lockfiles. Enjoy!
All Merged PRs
- Update to a non-yanked version of bumpalo by @yottalogical in #671
- Weekly
cargo update
of dependencies by @obi1kenobi in #670 - Release v0.29.1 to avoid yanked dependency version. by @obi1kenobi in #672
Full Changelog: v0.29.0...v0.29.1
v0.29.0
What's Changed
In this release: 5 new lints, one fixed false-positive, and assorted UX improvements.
This is the last release to support Rust 1.71-1.73. Future releases will require Rust 1.74+ both to install (MSRV) and at runtime.
Hat-tip to everyone that came to check out my talk on cargo-semver-checks
at FOSDEM 2024! We even got a chance to pair-program a few lints in the hallway after my talk: #649 with @rubdos, and #650 with @ehiggs.
Unfortunately, the FOSDEM recording had an AV glitch and lost ~10min of audio and video. But all is not lost!
- If you're in the Boston area, come to the Boston Rust meetup this Wednesday (Feb 21) where I'll again talk about cargo-semver-checks!
- I'm going to re-record the missing parts and post a new video, so follow me on Mastodon, Twitter, or Bluesky.
New lints:
exported_function_changed_abi
by @ehiggs (#650)repr_packed_added
by @jw013 (#666)repr_packed_removed
by @jw013 (#666)struct_pub_field_now_doc_hidden
by @rubdos (#649)trait_no_longer_object_safe
(Rust 1.77+ only) by @devanbenz (#659)
False positives fixed:
trait_method_unsafe_removed
no longer triggers on traits sealed using the pub-in-priv supertrait technique. Contributed by @yottalogical in #614.
Miscellaneous:
- Support checking
rlib
,dylib
, andstaticlib
Rust library types, by @obi1kenobi (#662, #663, #664). - Improve diagnostic messages when a crate fails to build, by @obi1kenobi (#656, #658)
All Merged PRs
- Weekly
cargo update
of dependencies by @obi1kenobi in #646 - Only run test with_env_var and with_flag on x86_64 by @Xeonacid in #647
- Weekly
cargo update
of dependencies by @obi1kenobi in #651 - test(with_env_var, with_flag): Add riscv64; Restrict os to Linux by @Xeonacid in #648
- Explicitly test on Rust 1.75 now that 1.76 comes out today. by @obi1kenobi in #652
- Weekly
cargo update
of dependencies by @obi1kenobi in #653 - feat: Trailing comma error message by @devanbenz in #655
- Improve diagnostic messages when surfacing errors from cargo. by @obi1kenobi in #656
- Improve error message readability by adding an extra newline. by @obi1kenobi in #658
- Weekly
cargo update
of dependencies by @obi1kenobi in #657 - Support checking rlib, dylib, and staticlib library types. by @obi1kenobi in #662
- feat: New lint trait_no_longer_object_safe by @devanbenz in #659
- Remove ability to check bin-only targets, to fix
doc = false
issue. by @obi1kenobi in #663 - Add test case for lib targets with a
doc = false
setting. by @obi1kenobi in #664 - Add lint for pub field becoming doc(hidden) by @rubdos in #649
- Fix false-positive in lint trait_method_unsafe_removed by @yottalogical in #614
- Add lints for repr(packed) being added or removed. by @jw013 in #666
- Minor QOL update to speed up reruns of regenerate_test_rustdocs script by @jw013 in #667
- Improves linting for issue 503 by adding lint to check ABI has not changed between functions with same
export_name
by @ehiggs in #650 - Weekly
cargo update
of dependencies by @obi1kenobi in #668 - Release v0.29.0 by @obi1kenobi in #669
New Contributors
- @Xeonacid made their first contribution in #647
- @devanbenz made their first contribution in #655
- @rubdos made their first contribution in #649
- @ehiggs made their first contribution in #650
Full Changelog: v0.28.0...v0.29.0
v0.28.0

What's Changed
New lints, new functionality, UX improvements, and an awesome new logo courtesy of NUMI!
Performance
Now running lints in parallel using rayon
(#625), for a ~3-4x speedup in lint execution time (i.e. not counting rustdoc generation and parsing time, which still dominate).
- In my measurements, the wall-clock time gains here are on the order of 12s (16s -> 4s) on the biggest crate I know of (
aws-sdk-ec2
, 240k+ items), and ~1s on most crates of more reasonable size. - Also added a better breakdown of where time is actually spent, between generating rustdoc, parsing the JSON, and running lints: #630
- The parallelization and the time breakdown improvements were both contributed by @jw013 🎉
New lints
enum_repr_transparent_removed
, contributed by @fprasx in #627- Ability to write lints for
union
types, also contributed by @fprasx: obi1kenobi/trustfall-rustdoc-adapter#309- This immediately enables writing at least a half dozen new lints, for which I'm happy to mentor contributors: #633
New functionality
Support for custom build.target
cargo configurations, contributed by @Nemo157: #619
It also supports setting an explicit cargo build target via our new --build-target
CLI flag.
Bugfixes
Bugfix for an unusual situation where having RUSTFLAGS="-Dwarnings"
would prevent rustdoc JSON from being built in case a dependency of the crate we're checking had warnings.
This would sometimes happen with the actions-rust-lang/setup-rust-toolchain
GitHub Action, which sets RUSTFLAGS="-Dwarnings"
by default.
All Merged PRs
- Add table of contents to FAQ and add a few more questions and answers. by @obi1kenobi in #618
- Add Rust 1.74 to the test matrix. by @obi1kenobi in #623
- Add test crate to test async fn and impl Future by @jw013 in #622
- update repr-related reference links by @fprasx in #626
- implement enum_repr_transparent_removed lint by @fprasx in #627
- Add timing output for rustdoc and crate total by @jw013 in #630
- Parallel lints by @jw013 in #625
cargo update
to enable queryingUnion
types' information. by @obi1kenobi in #631- Weekly
cargo update
of dependencies by @obi1kenobi in #636 - New Logo by @agreea in #628
- Add separate issue templates for false-positive and false-negatives. by @obi1kenobi in #639
- Mention our lint wishlist issue in the false-negative issue template. by @obi1kenobi in #640
- Update schema link in CONTRIBUTING.md by @obi1kenobi in #641
- Weekly
cargo update
of dependencies by @obi1kenobi in #642 - Detect when
build.target
is configured, and allow overriding it from the command line by @Nemo157 in #619 - Fix occasional failure to generate rustdoc when
RUSTFLAGS="-Dwarnings"
. by @obi1kenobi in #643 - Manually update dependencies before publishing new release. by @obi1kenobi in #644
- Release v0.28.0. by @obi1kenobi in #645
New Contributors
- @fprasx made their first contribution in #626
- @agreea made their first contribution in #628
- @Nemo157 made their first contribution in #619
Full Changelog: v0.27.0...v0.28.0
v0.27.0
What's Changed
New lints:
trait_method_unsafe_added
, contributed by @jw013 in #608trait_method_unsafe_removed
, contributed by @yottalogical in #612
Also added support for rustdoc's new v28 JSON format.
This brings us to 57 lints to end 2023, up from 30 at the end of last year 🎉 Writing lints is one of the easiest ways to contribute to cargo-semver-checks
— there are hundreds of lints yet to be added — so check out issues labeled E-mentor A-lint
and give it a shot!
All Merged PRs
- Weekly
cargo update
of dependencies by @obi1kenobi in #603 - Add new lint: trait_method_unsafe_added (#605) by @jw013 in #608
- Weekly
cargo update
of dependencies by @obi1kenobi in #610 - Add new lint: trait_method_unsafe_removed by @yottalogical in #612
- Update dependencies to support rustdoc v28. by @obi1kenobi in #615
- Weekly
cargo update
of dependencies by @obi1kenobi in #616 - Release v0.27 with support for rustdoc v28. by @obi1kenobi in #617
New Contributors
- @jw013 made their first contribution in #608
- @yottalogical made their first contribution in #612
Full Changelog: v0.26.0...v0.27.0
v0.26.0
What's Changed
Four new lints related to items being removed from the public API by making them #[doc(hidden)]
. All contributed by @u9g:
struct_now_doc_hidden
enum_now_doc_hidden
function_now_doc_hidden
trait_now_doc_hidden
All these are semver-major changes, as described in this post: https://predr.ag/blog/checking-semver-for-doc-hidden-items/
Plus, an update to our library API to allow suppressing cargo-semver-checks
logging output, to make it more pleasant for other tools to plug in cargo-semver-checks
functionality as a library. Contributed by @markhaehnel.
Semver-checking with this release requires Rust 1.71+.
All Merged PRs
- Test on Rust 1.73 explicitly since stable is now 1.74. by @obi1kenobi in #584
- Weekly
cargo update
of dependencies by @obi1kenobi in #585 - Weekly
cargo update
of dependencies by @obi1kenobi in #588 - implement struct_now_doc_hidden lint by @u9g in #587
- Weekly
cargo update
of dependencies by @obi1kenobi in #591 - implement enum_now_doc_hidden lint by @u9g in #593
- implement function_now_doc_hidden lint by @u9g in #594
- implement trait_now_doc_hidden lint by @u9g in #595
- Add more details to MSRV policy in README FAQ by @obi1kenobi in #598
- Enable suppressing all output ("silent mode") by @markhaehnel in #592
- release v0.26 by @obi1kenobi in #601
New Contributors
- @markhaehnel made their first contribution in #592
Full Changelog: v0.25.0...v0.26.0
v0.25.0
What's Changed
Resolved nearly all false-positive lints that were caused by improper doc(hidden)
handling — nearly 60% of all false-positives observed in the real world!
- Joint work with @davidhewitt: #576
- Description of how it works, and why it was much more complex than just "pretend
doc(hidden)
items don't exist": https://predr.ag/blog/checking-semver-for-doc-hidden-items/
Proper doc(hidden)
handling requires Rust 1.73+, due to a rustdoc bug in prior versions that causes re-exported hidden items to be inappropriately omitted from rustdoc JSON files. Therefore:
- we drop support for Rust 1.70, and
- we advise against using Rust 1.71-1.72 even though
cargo-semver-checks
will still run with them, since they happen to share a rustdoc JSON format with Rust 1.73.
All Merged PRs
- Remove erroneous curly brace from
module_missing
error format string. by @obi1kenobi in #574 - Weekly
cargo update
of dependencies by @obi1kenobi in #575 - Improve error message for
inherent_method_const_removed
lint. by @obi1kenobi in #577 - Do not consider
#[doc(hidden)]
items part of the public API. by @obi1kenobi in #576 - Weekly
cargo update
of dependencies by @obi1kenobi in #580 - Add counterexample test case for ignoring doc(hidden) items. by @obi1kenobi in #581
- Update Trustfall, trustfall_rustdoc, and gix/tame-index dependencies. by @obi1kenobi in #582
- Release v0.25, featuring correct
#[doc(hidden)]
handling. by @obi1kenobi in #583
Full Changelog: v0.24.2...v0.25.0
v0.24.2
What's Changed
Treat quoted empty-strings as empty-string in CLI feature selection code, contributed by @HadrienG2 in #569.
All Merged PRs
- Treat quoted empty string as an empty string by @HadrienG2 in #569
- Update dependencies before publishing new release. by @obi1kenobi in #571
- Release v0.24.2 with CLI tweak to ignore empty-string features. by @obi1kenobi in #572
Full Changelog: v0.24.1...v0.24.2
v0.24.1
What's Changed
A couple of minor tweaks:
- If configured to use a
git
cargo index, and the index directory doesn't exist — create it and continue. - Treat
--features=""
as a no-op feature. Same for--current-features
and--baseline-features
.
Thanks to @Jake-Shadle for quickly pushing an update to tame-index
to fix the git
index issue, and to @HadrienG2 for contributing the --features=""
change.
All Merged PRs
- Weekly
cargo update
of dependencies by @obi1kenobi in #553 - Weekly
cargo update
of dependencies by @obi1kenobi in #555 - Create FUNDING.yml by @obi1kenobi in #556
- Use sccache for GitHub Actions CI. by @obi1kenobi in #557
- Manually create the git index directory. by @obi1kenobi in #560
- Print sccache statistics after binary builds. by @obi1kenobi in #559
- Create git index directory in Windows CI run as a workaround. by @obi1kenobi in #562
- Use
actions/checkout@v4
andactions-rust-lang/setup-rust-toolchain@v1
. by @obi1kenobi in #558 - Pull in fix for missing index directory bug. by @obi1kenobi in #563
- Treat an empty features string as a no-op like Cargo does by @HadrienG2 in #566
- Weekly
cargo update
of dependencies by @obi1kenobi in #568 - Release v0.24.1. by @obi1kenobi in #567
New Contributors
- @HadrienG2 made their first contribution in #566
Full Changelog: v0.24.0...v0.24.1
v0.24.0
What's Changed
This release drops our git2
dependency in favor of gix
, which is much faster in practice. We already had a dependency on gix
via tame-index
, so this switch also improves compile times. Thanks to @Byron for this contribution!
New lints in this release:
function_changed_abi
by @samuelraymenttrait_removed_associated_constant
by @samuelraymentmodule_missing
by @nmathewson
Bugfixes:
- Re-exporting items as
_
no longer produces false positives: #536, fixed in #541 - Checking a newly-added lib target of a crate that has a bin-only release on crates.io no longer crashes: #511, fixed in #548
This release has an MSRV of Rust 1.70. However, Rust 1.68-1.70 share a rustdoc JSON format, so semver-checking crates that need 1.68 or 1.69 is supported — just use our precompiled binaries or compile cargo-semver-checks
itself on Rust 1.70+.
All Merged PRs
- The command is
cargo semver-checks
now, the suffix is unnecessary. by @obi1kenobi in #530 - New "module_missing" lint to detect missing, renamed, or non-visible modules by @nmathewson in #534
- New lint for removed associated constant in trait by @samuelrayment in #539
- Use Rust 1.70 as baseline for cross-version caching test. by @obi1kenobi in #540
- Migrate from
git2
togix
by @Byron in #531 - Set explicit MSRV of 1.70 to match our dependencies. by @obi1kenobi in #542
- Fix false-positives when re-exporting items as
_
by @obi1kenobi in #541 - Fix new nightly clippy lint. by @obi1kenobi in #543
- Weekly
cargo update
of dependencies by @obi1kenobi in #545 - Stable is now 1.73, so test on 1.72 explicitly. by @obi1kenobi in #547
- Do not crash when a crate locally has a newly-added lib target. by @obi1kenobi in #548
- Adds lint for public function ABI change by @samuelrayment in #546
- Move the
@optional
block to the end in the ABI lint. by @obi1kenobi in #550 - Upgrade to new tame_index and gix major versions. by @obi1kenobi in #551
- Release v0.24. by @obi1kenobi in #552
New Contributors
- @nmathewson made their first contribution in #534
- @samuelrayment made their first contribution in #539
- @Byron made their first contribution in #531
Full Changelog: v0.23.0...v0.24.0