15 pages tagged with "semver"
Breakage! in the Cargo.toml — How Rust Package Features Work (And Break)
December 04, 2024 - 2004 words - 11 minscargo-semver-checks
v0.37 can now scan Cargo.toml
files for breakage! In this post: a primer on Rust package features, and how innocuous-looking Cargo.toml
changes can break your users.
Is this trait sealed, or not sealed — that is the question
September 03, 2024 - 2082 words - 11 minscargo-semver-checks
v0.35 can determine whether Rust traits are "sealed", allowing it to catch many tricky new instances of SemVer breakage. Why is accurate sealed trait detection so important, and why is implementing it correctly so hard?
SemVer in Rust: Tooling, Breakage, and Edge Cases — FOSDEM 2024
March 18, 2024 - 10726 words - 54 minsFour challenges cargo-semver-checks has yet to tackle
January 23, 2024 - 2117 words - 11 minsMy last post covered the key cargo-semver-checks
achievements from 2023. Here are the biggest challenges that lie ahead!
Many of the remaining challenges in cargo-semver-checks are obvious: we all want more lints, fewer false-positives, etc. etc. Let's set those aside.
Instead, let's talk about four non-obvious challenges we have yet to tackle:
read moreHighlights of 2023 for cargo-semver-checks
January 16, 2024 - 1679 words - 9 minsChecking semver in the presence of doc(hidden) items
November 18, 2023 - 2882 words - 15 minscargo-semver-checks
v0.25 squashes nearly all bugs related to doc(hidden)
items — its most common source of false-positives. What does doc(hidden)
mean in Rust, and why was handling it correctly so hard?
Semver violations are common, better tooling is the answer
September 07, 2023 - 3270 words - 17 minsBreaking semver in Rust by adding a private type, or by adding an import
May 08, 2023 - 3718 words - 19 minsA few days ago, I started polls on Mastodon and Twitter whether adding a new private type, or an import, can ever be a major breaking change. The consensus was that this should be impossible.
I agree with that. It should be impossible.
I've discovered a way to cause a previously-public type or function to disappear from a crate's public API by making innocuous-seeming changes like adding a private type or adding an import, etc. It is not a hypothetical problem, either — I've found at least one real-world Rust project that has been affected by it.
read moreRe-exporting an enum with a type alias is breaking, but not major
March 06, 2023 - 813 words - 5 minsWe've already explored some of the dark corners of Rust semantic versioning on this blog:
read moreSpeeding up Rust semver-checking by over 2000x
February 07, 2023 - 3926 words - 20 minsThis post describes work in progress: how cargo-semver-checks
will benefit from the upcoming query optimization API in the Trustfall query engine. Read on to learn how a modern linter works under the hood, and how ideas from the world of databases can improve its performance.
Moving and re-exporting a Rust type can be a major breaking change
January 31, 2023 - 1194 words - 6 minsSome Rust breaking changes don't require a major version
January 26, 2023 - 1848 words - 10 minsTurning a Rust struct into an enum is not always a major breaking change
January 24, 2023 - 1611 words - 9 minscargo-semver-checks today and in 2023
December 23, 2022 - 1946 words - 10 minsToward fearless cargo update
August 25, 2022 - 1866 words - 10 minsI recently built cargo-semver-checks
, a linter that ensures crates adhere to semantic versioning. This is why and how I built it.
Fearless development is a key theme throughout Rust. "If it compiles, it works", fearless concurrency, etc.
But there's one aspect of Rust (and nearly all other languages) that isn't entirely fearless yet: cargo update
, upgrading the versions of the project's dependencies.