Exponential growth continued — cargo-semver-checks 2025 Year in Review

8 points by predrag


predrag

In addition to recapping 2025, the post proposes a set of goals I believe cargo-semver-checks should strive for in the coming years. TL;DR there: "Total number of lints" is a fun number to look at, but increasingly just a vanity metric. I believe the community will be best served by us tackling some of our long-standing (and most difficult) challenges, instead of trying to chase exponential lint growth by itself.

Please see the post where I make a complete case for this, then let me know what you think!

typesanitizer

Testing N lints on N test crate pairs results in 3 * N * N total lint executions. 2 * N lints means 2 * N test crate pairs, quadrupling the total lint executions in the test suite to 3 * (2 * N) * (2 * N).

What's the most expensive operation when running a lint? Naively, I'd have assumed that it would be extracting the rustdoc JSON and building any indexes over it (I'm assuming the trustfall query engine does build indexes). In that case, up-front work would scale as O(N A log(N A)) where A is the number of APIs per crate and N is the number of crates, and per-lint work would scale as O(L N A log(N A)) where L is the number of lints if every lint potentially applies to every API. I'd assume that most lints don't apply to most APIs...

Obviously I must be missing one or more key things, so curious as to where this naive math goes wrong.