Skip to content

Cache source-sensitive Clippy passes per module - #49

Open
charliermarsh wants to merge 3 commits into
charlie/1.98/incremental-zero-sized-map-valuesfrom
charlie/1.98/incremental-clippy-source-inputs
Open

charliermarsh wants to merge 3 commits into
charlie/1.98/incremental-zero-sized-map-valuesfrom
charlie/1.98/incremental-clippy-source-inputs

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Aug 30, 2026 •

Copy link
Copy Markdown
Collaborator

Extend module caching to needless_pass_by_value, redundant_clone, unnecessary_wraps, and needless_borrows_for_generic_args, bringing the total to 56 passes and 62 lints.

These passes read source text to construct suggestions. Their reads now use the compiler's source-file query, so comment and whitespace edits invalidate cached suggestions even when HIR is unchanged. Borrower-analysis state remains local to each traversal. Compilers without the source-input hook keep these passes in the whole-crate traversal.

The first two passes reduced Ruff/ty edit times by 5.2% across six pairs, with a separate three-pair confirmation showing 3.8%. Adding the other two reduced times by another 1.1% in a separate six-pair comparison. These are preliminary, separate comparisons and should not be added together. Both used matched release-profile builds without PGO/BOLT and produced matching diagnostics.

This includes the additional passes previously split into #50.

@charliermarsh
charliermarsh marked this pull request as ready for review August 30, 2026 04:32
charliermarsh added a commit to astral-experiments/ohm that referenced this pull request Aug 30, 2026
Prepare Ohm 1.98.0 revision 4 with incremental Clippy diagnostics,
per-item visibility inputs, streamed well-formedness obligations, and
the shared registry cache deadlock repair. Pin the compiler stack
through [ohm-rust#75](astral-experiments/ohm-rust#75),
including [#72](astral-experiments/ohm-rust#72), the
Cargo stack through
[ohm-cargo#100](astral-experiments/ohm-cargo#100), and
the Clippy stack through
[ohm-rust-clippy#49](astral-experiments/ohm-rust-clippy#49).
Preserve the existing rustfmt pin and align the compiler's Cargo gitlink
with the manifest.

Add the versioned manifest, select it by default, update installation
examples, and refresh the upstream-change document. Clippy now caches 56
audited passes covering 62 lint kinds. The Cargo lock repair changes the
shared-cache namespace, so the first build repopulates affected
artifacts and unchanged builds may incur additional lock-preparation
overhead.

Keep the component PRs open for review in one GitHub stack per
repository. The unmeasured parallel query-cache promotion experiment in
ohm-rust#66 remains above the selected compiler pin and outside this
release. Preserve all historical manifests and published benchmark
results; the existing performance figures remain labeled as Ohm 1.98.0-3
measurements.
@charliermarsh
charliermarsh force-pushed the charlie/1.98/incremental-clippy-source-inputs branch from 5bd3512 to efc8b76 Compare September 8, 2026 21:01
@charliermarsh
charliermarsh force-pushed the charlie/1.98/incremental-clippy-source-inputs branch from efc8b76 to 55ebc33 Compare September 8, 2026 21:05
@charliermarsh
charliermarsh force-pushed the charlie/1.98/incremental-clippy-source-inputs branch from 55ebc33 to c1e3ae1 Compare September 16, 2026 16:39
@charliermarsh
charliermarsh removed this pull request from stack #53 October 1, 2026 15:07
@charliermarsh
charliermarsh changed the base branch from charlie/1.98/incremental-zero-sized-map-values to ohm-1.99.0 October 1, 2026 15:08
@charliermarsh
charliermarsh force-pushed the charlie/1.98/incremental-clippy-source-inputs branch from c1e3ae1 to 274852c Compare October 1, 2026 15:08
@charliermarsh
charliermarsh changed the base branch from ohm-1.99.0 to charlie/1.98/incremental-zero-sized-map-values October 1, 2026 15:09
@charliermarsh
charliermarsh added this pull request to stack #55 October 1, 2026 15:09
@charliermarsh
charliermarsh removed this pull request from stack #55 October 1, 2026 15:21
@charliermarsh
charliermarsh changed the base branch from charlie/1.98/incremental-zero-sized-map-values to ohm-1.99.0 October 1, 2026 15:22
@charliermarsh
charliermarsh force-pushed the charlie/1.98/incremental-clippy-source-inputs branch from 274852c to beda438 Compare October 1, 2026 15:22
@charliermarsh
charliermarsh changed the base branch from ohm-1.99.0 to charlie/1.98/incremental-zero-sized-map-values October 1, 2026 15:23
@charliermarsh
charliermarsh added this pull request to stack #56 October 1, 2026 15:23
@charliermarsh
charliermarsh removed this pull request from stack #56 October 1, 2026 16:20
@charliermarsh
charliermarsh changed the base branch from charlie/1.98/incremental-zero-sized-map-values to ohm-1.99.0 October 1, 2026 16:20
@charliermarsh
charliermarsh force-pushed the charlie/1.98/incremental-clippy-source-inputs branch from beda438 to f521437 Compare October 1, 2026 16:20
@charliermarsh
charliermarsh changed the base branch from ohm-1.99.0 to charlie/1.98/incremental-zero-sized-map-values October 1, 2026 16:21
@charliermarsh
charliermarsh added this pull request to stack #57 October 1, 2026 16:21
@charliermarsh
charliermarsh force-pushed the charlie/1.98/incremental-clippy-source-inputs branch from f521437 to 0b5067c Compare October 7, 2026 13:56
@charliermarsh
charliermarsh removed this pull request from stack #57 October 7, 2026 13:58
@charliermarsh
charliermarsh added this pull request to stack #58 October 7, 2026 13:58
@charliermarsh
charliermarsh force-pushed the charlie/1.98/incremental-clippy-source-inputs branch from 0b5067c to 0fc387c Compare October 16, 2026 00:41
@charliermarsh
charliermarsh removed this pull request from stack #58 October 16, 2026 01:01
@charliermarsh
charliermarsh added this pull request to stack #61 October 16, 2026 01:02
@charliermarsh
charliermarsh removed this pull request from stack #61 November 1, 2026 17:14
@charliermarsh
charliermarsh added this pull request to stack #71 November 1, 2026 17:14
@charliermarsh
charliermarsh removed this pull request from stack #71 November 2, 2026 15:30
@charliermarsh
charliermarsh added this pull request to stack #80 November 2, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant