Repository navigation
ci(lint): install rustfmt/clippy via rustup; relax test_version assert - #81
Merged
Merged
Conversation
Soldr (via zccache) is the project's compile cache. The sccache fallback in ci/env.py::_apply_rustc_wrapper was carried forward from the pre-soldr era; with PR #79 (closing #75) it no longer serves a purpose. Remove the fallback so RUSTC_WRAPPER points only at zccache when set. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes the two CI regressions that PR #80 surfaced on main: 1. **Lint job missing rustfmt and clippy.** zackees/setup-soldr@v0 reads only the channel from rust-toolchain.toml; the components array (["clippy", "rustfmt"]) is ignored. With the minimal profile, cargo fmt fails: error: 'cargo-fmt' is not installed for the toolchain Provision them explicitly via rustup component add after setup-soldr. Soldr itself does not yet expose component management — its CLI runs tools from the active toolchain but doesn't install missing components. 2. **test_version.py expects bare version string.** The Rust CLI (clap) emits 'fastled 2.0.7' for --version, matching the standard '<bin> <version>' format. The Python-era argparse emitted just '2.0.7'. Switch from assertEqual to assertIn so the package version is verified to be present without prescribing the exact format. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to PR #80, which merged with two failing CI checks on main:
error: 'cargo-fmt' is not installed for the toolchain 'stable-aarch64-unknown-linux-gnu'AssertionError: 'fastled 2.0.7' != '2.0.7'Root causes
Failure 1 — missing rustfmt/clippy components
zackees/setup-soldr@v0readschannelfromrust-toolchain.tomlbut ignores thecomponentsarray. The action provisionsstablewithprofile: minimaland no components, socargo fmt/cargo clippyfail.The pinned channel
1.94.1fromrust-toolchain.tomlwas also dropped — setup-soldr resolves tostableregardless. That's a separate issue worth filing with setup-soldr; for now provision the components explicitly.Soldr's own CLI does not yet expose component management (its subcommands are
cargo,rustc,rustfmt,clippy-driver, …, which all assume the component is already installed). The pragmatic fix is to callrustup component addaftersetup-soldrprovisioned rustup.Failure 2 — version-string format change
fastled --versionpreviously went through Python argparse and emitted the bare version string2.0.7. With the migration to the Rust CLI (clap), the output becamefastled 2.0.7— clap's standard<bin> <version>format. The test still usedassertEqual. Relaxed toassertIn, which verifies the package version is present without prescribing the exact format.Files
.github/workflows/_lint.yml— addrustup component add rustfmt clippystep aftersetup-soldr.tests/unit/test_version.py— switchassertEqual→assertIn.Test plan
bash lint— green locallyuv run pytest tests/unit/test_version.py -v— passesRelated
🤖 Generated with Claude Code