Releases: obi1kenobi/cargo-semver-checks
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
v0.23.0
What's Changed
This release enables sparse index support, which you'll notice in the form of much faster semver-checking time. Thanks to @Jake-Shadle for this huge contribution!
New lints in this release:
This is the last version to support Rust 1.67.
Due to many of our dependencies raising MSRV to 1.70, our future releases will also have an MSRV of 1.70 or higher. However, Rust 1.68-1.70 share a rustdoc JSON format, so the next planned release will be able to test crates that need 1.68 or 1.69 — just compile cargo-semver-checks
itself on Rust 1.70 or higher before using it with 1.68-1.69.
All Merged PRs
- Automatically keep
Cargo.lock
up to date. by @obi1kenobi in #483 - Fix dependency updater variable references. by @obi1kenobi in #484
- Weekly
cargo update
of dependencies by @obi1kenobi in #486 - Weekly
cargo update
of dependencies by @obi1kenobi in #489 - Add Rust 1.70 to test grid since stable is 1.71 now. by @obi1kenobi in #492
- Avoid lint by rewriting macro. by @obi1kenobi in #493
- Prettier test diff output via
similar-asserts
. by @obi1kenobi in #494 - Add lint for missing pub module-level const by @gliu20 in #491
- Ensure missing span_filename and span_begin_line shows user friendly error by @gliu20 in #490
- New lint: Pub module level static missing by @gliu20 in #496
- Weekly
cargo update
of dependencies by @obi1kenobi in #497 - Weekly
cargo update
of dependencies by @obi1kenobi in #498 - Make CI hash Rust files not toml files by @u9g in #501
- Weekly
cargo update
of dependencies by @obi1kenobi in #504 - Weekly
cargo update
of dependencies by @obi1kenobi in #505 - Update to Trustfall v0.6. by @obi1kenobi in #508
- Fix the rustc min version check to require Rust 1.67, not 1.65. by @obi1kenobi in #507
- Add Trait removed associated type lint by @u9g in #500
- Upgrade dependency major versions. by @obi1kenobi in #509
- Replace
crates-index
withtame-index
by @Jake-Shadle in #506 - Weekly
cargo update
of dependencies by @obi1kenobi in #510 - Weekly
cargo update
of dependencies by @obi1kenobi in #512 - Don't clippy dependencies. Lint rustdoc of hidden items. by @obi1kenobi in #514
- Rewrite code to avoid triggering new clippy lint. by @obi1kenobi in #515
- Point to the new repo name. by @obi1kenobi in #516
- Weekly
cargo update
of dependencies by @obi1kenobi in #517 - Weekly
cargo update
of dependencies by @obi1kenobi in #520 - Use serde 1.0.185, skipping past the version with a precompiled binary. by @obi1kenobi in #521
- Ensure we test on both Rust 1.71 and 1.72 stable. by @obi1kenobi in #522
- Fix error in link by @c-git in #526
- Weekly
cargo update
of dependencies by @obi1kenobi in #523 - Support rustdoc v27 for latest nightly. by @obi1kenobi in #529
- Release v0.23.0 with new lints and sparse index support. by @obi1kenobi in #528
New Contributors
- @gliu20 made their first contribution in #491
- @u9g made their first contribution in #501
- @Jake-Shadle made their first contribution in #506
- @c-git made their first contribution in #526
Full Changelog: v0.22.1...v0.23.0
v0.22.1
What's Changed
- Fix crash when checking crate without a lib target, or a workspace with such a crate.
- Such crates are now skipped by default. The tool exits with an error if there are no lib crates to check.
All Merged PRs
- Remove outdated O(n^2) section. by @obi1kenobi in #475
- Skip crates without lib targets; exit non-zero if nothing to check. by @obi1kenobi in #477
- Update dependencies. by @obi1kenobi in #478
- Release v0.22.1. by @obi1kenobi in #479
Full Changelog: v0.22.0...v0.22.1
v0.22.0
What's Changed
- New lint:
trait_removed_supertrait
All Merged PRs
- New lint: trait removed supertrait by @era in #470
- Update dependencies. by @obi1kenobi in #472
- Release v0.22 with new lint: trait removed supertrait. by @obi1kenobi in #474
Full Changelog: v0.21.0...v0.22.0
v0.21.0
What's Changed
- Better defaults and fine-grained control over which crate features are semver-checked
- Includes CLI flags for overriding feature groups and including features to be checked.
- New heuristic for choosing features to semver-check while avoiding unstable, nightly, and private-only features.
- This heuristic replaces the prior default behavior of checking all features even if they were clearly marked as unstable or private.
- New lint:
trait_method_missing
- Many improvements to various error messages.
This release only supports semver-checking rustdoc generated by Rust 1.67+, dropping support for rustdoc formats v21 and v22 part of Rust 1.65 and 1.66 respectively. This was previously announced in the release notes of the v0.20 release.
All Merged PRs
- Minimum rustc version error by @arnaudgolfouse in #449
- Add ability to specify features in CLI by @staniewzki in #426
- Upgrade dependency versions. by @obi1kenobi in #455
- feat: Add lint for missing trait methods by @zurawiki in #427
- Improved error message when no baseline version found on crates.io by @era in #456
- Replace rustdoc v25 with v26 support. by @obi1kenobi in #457
- Update to git2 0.17 and accompanying new crates-index version. by @obi1kenobi in #460
- Update features heuristic to include more unstable and private feature name patterns by @era in #463
- Running cargo semver-checks with no other arguments should default to checking by @era in #459
- Add Rust 1.69 to test list. by @obi1kenobi in #464
- Update README with feature flags examples by @staniewzki in #458
- Release v0.21. by @obi1kenobi in #466
New Contributors
- @arnaudgolfouse made their first contribution in #449
- @zurawiki made their first contribution in #427
- @era made their first contribution in #456
Full Changelog: v0.20.1...v0.21.0