The tree requires clippy >= 1.98 to lint while declaring rust-version 1.93, and nothing records either #112
Labels
No labels
blocked
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
waiting-on-julian
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jlxq0/matrix-mcp#112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two
#[allow]attributes name lints that only exist from clippy 1.98 onward, soon any earlier stable they fail as
unknown-lintsunder-D warnings:clippy::chunks_exact_to_as_chunksatsrc/mcp.rs:614clippy::unused_async_trait_implatsrc/mcp.rs:7003Probed directly, with a throwaway crate carrying nothing but the two
attributes:
error
So the tree requires clippy >= 1.98 to lint, and nothing records that. This
is a floor, not a version window: moving forward only adds lints, so the runner
is fine and stays fine as it advances. What goes red is anyone whose stable is
behind 1.98. CI passes because the runner's stable is current.
The CI command and the failing local command are character-for-character
identical, so the command is not the variable. Only the toolchain is.
The sharper half
Cargo.toml:5declaresrust-version = "1.93". The tree cannot passcargo clippy -D warningson anything below 1.98. The declared MSRV is threereleases below what linting actually requires, and these two attributes are what
put it there — the global rule against reaching past the declared
rust-versionto satisfy a lint, in the concrete.Either the MSRV is wrong or the attributes are. Decide which; do not raise
the floor by reflex.
chunks_exact_to_as_chunksin particular looks like it maypostdate a rename, so check whether the underlying lint even fires on the code
it guards before keeping the attribute.
Fix
A recorded minimum, or a pinned
toolchain:inci.ymlinstead ofstable.Not a version range, and not
#[allow(unknown_lints)]— that hides the nextinstance of the same class.
Acceptance
Not "clippy is green here". State which toolchain the tree is known-good on and
make a mismatch observable, so the next red clippy is classified in one command
rather than an investigation. If the decision is to keep the attributes, the
declared
rust-versionhas to move with them and the build has to failhonestly below the floor rather than only clippy failing confusingly.
Not the tree's problem, but it is why this surfaced
The machine that hit it had a stale
stable:~/.config/mise/config.tomlsetsrust = "stable", mise resolves that through rustup'sstablesymlink, andthat symlink had not moved since May, so
stablewas 1.96 with 1.98 sittinginstalled alongside.
rustup update stablefixes the machine. That is aseparate item and does not change anything above — the tree still declares an
MSRV it cannot lint on.
Provenance
Found by an Operations worker running the release gates for
v0.10.2,direction corrected by Clark by probing both toolchains and reading
rustup toolchain liston the box. The runner'scargojob passed on153e562at 02:14Z and 06:52Z throughout, so CI was never evidence either way.Development work. It must not ride in a release tag.
Two #[allow] attributes name lints newer clippy does not have, so the tree only builds on a window of toolchainsto The tree requires clippy >= 1.98 to lint while declaring rust-version 1.93, and nothing records eitherRecording what the first version of this issue got wrong, because the fix that
followed from it was the wrong fix and somebody may have read it.
Claimed: the failing machine's stable was ahead of the runner's, so the
tree builds only on a window of clippy versions, and the runner drifting forward
would eventually red a tree nobody touched.
Actual: both lints are new in 1.98 and absent from 1.96. The failing
machine's stable was three months behind the runner's. There is no window and
no forward-drift risk: moving forward only adds lints. The requirement is a
floor.
Why the wrong version was plausible: a red clippy locally and a green clippy in
CI is consistent with either direction, and the direction cannot be inferred
from that pair. It took probing both toolchains against the two attributes in
isolation, plus
rustup toolchain liston the machine, to tell which way it ran.Neither the CI logs nor the failure message distinguishes them — the same
unknown-lintserror appears whichever side lacks the lint.The
rust-version = "1.93"conflict in the body was only found while chasing thecause, and it is the larger of the two problems.