Bump the Dylint dependency binaries to 6.0.1 - #283
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 47 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
WalkthroughUpdate the pinned ChangesDependency version update
Sequence Diagram(s)sequenceDiagram
participant PublishCheck
participant InstalledTools
participant CargoInstall
PublishCheck->>InstalledTools: Check dylint tool versions
InstalledTools-->>PublishCheck: Return installed versions
PublishCheck->>CargoInstall: Install mismatches at 6.0.1 into a temporary root
CargoInstall-->>PublishCheck: Return temporary bin directory
PublishCheck->>InstalledTools: Use temporary tools through PATH
Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (3 errors, 2 warnings, 1 inconclusive)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Move cargo-dylint and dylint-link from 4.1.0 to 6.0.1 in the dependency binary manifest, and the Makefile's local install pins from 5.0.0 to 6.0.1. Test expectations and doc examples that mirror the embedded manifest move in step. Dylint 6 works on the current pin (nightly-2025-09-18) — the suite's own UI tests already build drivers with dylint_testing 6.0.1 — but dylint_driver 5.0.0 and earlier cannot compile on newer nightlies because ParseSess::env_depinfo and file_depinfo were removed upstream. Publishing 6.0.1 dependency binaries in the rolling release before the toolchain pin flips keeps consumer continuous integration green through the migration.
publish-check accepted any cargo-dylint or dylint-link found on PATH, so a stale install (for example 5.0.0) silently drove the check instead of the pinned versions. The recipe now probes the installed cargo-dylint version directly and consults `cargo install --list` for dylint-link (its --version flag forwards to the underlying linker, so the binary cannot report its own version). Mismatched or missing tools are installed into an isolated per-run tool directory that is prepended to PATH, leaving any system-wide installs untouched.
find_dependency_binary_returns_matching_package checked only cargo-dylint, so the dylint-link pin could drift without a test failure. The test is now parameterized over both manifest entries with rstest cases asserting package, binary, and version.
The manifest example still showed cargo-dylint at 4.1.0; align it with the 6.0.1 pin so the guide matches the committed manifest.
|
Review feedback addressed, rebased onto main (b10fc19):
Gates on the rebased branch: check-fmt, lint, test (1454/1454), markdownlint — all green. |
|
@coderabbitai resume |
✅ Action performedReviews resumed. |
Run the recipe's continued shell block under `set -eu`, matching the idiom the other long recipes already use, so failed builds, test runs, clones, and tool installs abort the gate instead of being ignored. Guard the `cd` into the cloned tree with an explicit `exit 1`: as a non-final member of an `&&` list it was exempt from `set -e`, and a failed `cd` would have silently skipped the entire dylint build and verification step while the gate still exited zero.
Move the pinned cargo-dylint and dylint-link provisioning out of the publish-check recipe into `scripts/install-dylint-tools.sh`, following the repository's tested-script convention. The script probes cargo-dylint via `--version` and dylint-link via `cargo install --list` (its own `--version` is forwarded to `cc` by the linker shim), installs mismatches into an isolated root, and exits non-zero on any install failure so the gate can never continue with stale tools. Behavioural tests run the script under stubbed `cargo` and `cargo-dylint` binaries, covering the no-op path, stale and missing tool installs into the pinned root, install-failure abort, and argument validation.
Describe the fail-fast behaviour and the pinned Dylint tool provisioning in the publishing runbook, and cross-reference it from the developers' guide prerequisites.
|
Review-round summary (verified per finding before acting):
Gates on the branch: check-fmt, lint, test (1454 passed), markdownlint, and the new pytest suite — all green. |
|
@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response. Ensure that this is validated against the current version of the codegraph. If further refinement to address this finding would be deleterious, please supply a clear explanatory one to two paragraph markdown message I can paste into the CodeScene web ui's diagnostic suppression function so this diagnostic can be silenced. tests/workflows/test_install_dylint_tools.py Comment on lines +103 to +119 def test_matching_tools_install_nothing(tmp_path: Path) -> None:
"""Matching system versions must not trigger any install."""
stub_dir = tmp_path / "bin"
stub_dir.mkdir()
_write_stub(
stub_dir,
"cargo-dylint",
f'echo "cargo-dylint {CARGO_DYLINT_VERSION}"',
)
_write_cargo_stub(stub_dir, installed_dylint_link=DYLINT_LINK_VERSION)
tools_root = tmp_path / "tools"
result = _run_script(stub_dir, tools_root)
assert result.returncode == 0, result.stderr
assert _install_log(stub_dir) == ""
assert not tools_root.exists()❌ New issue: Code Duplication |
This comment was marked as resolved.
This comment was marked as resolved.
The fail-fast rework surfaced a real bootstrap gap in CI: cargo-dylint 6.0.1's lockfile pins cargo-util 0.2.28, which requires rustc 1.93, while the repository's pinned nightly provides 1.92 — so the host tool cannot be source-built under the pinned toolchain at all. The host tools are toolchain-independent (only the dylint driver needs the pinned nightly, and publish-check stages libraries without a driver build), so the provisioning script gains an optional TOOLCHAIN argument and the Makefile passes `DYLINT_TOOLS_TOOLCHAIN` (default `stable`). Also switch the version probe to `cargo-dylint dylint --version`: since 6.x the binary rejects a bare `--version`, which would have made the probe miss and reinstall on every run. Verified end to end against crates.io: both tools build under stable in ~40 s, and a second run with 6.0.1 on PATH skips the cargo-dylint reinstall.
|
@coderabbitai Have the following now been resolved? installer/src/dependency_binaries/manifest.rs (1)
Parameterize the manifest lookup test- #[test]
+ #[rstest]
+ #[case("cargo-dylint", "cargo-dylint", "6.0.1")]
+ #[case("dylint-link", "dylint-link", "6.0.1")]
- fn find_dependency_binary_returns_matching_package() {
- let tool = find_dependency_binary("cargo-dylint")
+ fn find_dependency_binary_returns_matching_package(
+ #[case] package: &str,
+ #[case] binary: &str,
+ #[case] version: &str,
+ ) {
+ let tool = find_dependency_binary(package)
.expect("embedded manifest should stay parseable")
.expect("tool should exist");
- assert_eq!(tool.binary(), "cargo-dylint");
- assert_eq!(tool.version(), "6.0.1");
+ assert_eq!(tool.binary(), binary);
+ assert_eq!(tool.version(), version);
}As per coding guidelines, all new functionality and behavioural changes require rigorous, non-vacuous tests. 🤖 Detailed instructionsVerify each finding against current code. Fix only still-valid issues, skip the In |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '== manifest.rs outline =='
ast-grep outline installer/src/dependency_binaries/manifest.rs --items all --view expanded
echo
echo '== target test and rstest context =='
rg -n -C 12 '\b(find_dependency_binary_returns_matching_package|rstest)\b' \
installer/src/dependency_binaries/manifest.rs
echo
echo '== Dylint manifest entries =='
rg -n -C 4 '^(package|binary|version) = "(cargo-dylint|dylint-link|6\.0\.1)"$' \
installer/dependency-binaries.tomlLength of output: 4891
Verify Lines 363–375: the test is now parameterized with distinct Verify |
Extract `_write_matching_tool_stubs` so the no-op and dylint-link-install tests share their arrangement; the two tests stay separate because they verify different outcomes.
|
@coderabbitai Have the following failed checks now been resolved? If further work is required, please provide an AI agent prompt for the remaining work to be done to address these failures. Do not treat warnings as optional or aspirational. Where a change is out of scope for this PR, propose a GitHub issue unless one exists already. (Treat documentation and validation coverage as in scope). ❌ Failed checks (3 errors, 2 warnings, 1 inconclusive)
|
This comment was marked as resolved.
This comment was marked as resolved.
Add integration tests that run the real `publish-check` recipe with every external command stubbed (`cargo`, `cargo-dylint`, `cargo-nextest`, `rustup`, `git`), proving the Makefile handoff rather than the provisioning script in isolation: a stale system cargo-dylint triggers installation into the isolated root and the later Dylint-facing command resolves the isolated `bin/` ahead of the stale binary, while a failed install aborts the target before any clone, per-lint build, Dylint invocation, or packaging runs. Stubs record their invocations to a log; no network access, Rust builds, or real installs occur. The recipe itself needed no refactoring: full command stubbing keeps the production command order and fail-fast semantics under test exactly as shipped.
|
Integration coverage added in |
CodeScene flagged the harness as a large method; each stub now has its own documented writer, with the cargo stub's install and build branches generated by dedicated helpers, and the harness reduced to a coordinator.
Summary
Bumps the Dylint dependency binaries from cargo-dylint/dylint-link 4.1.0 to
6.0.1, and the Makefile's local install pins from 5.0.0 to 6.0.1.
This is a standalone-safe prerequisite for the forthcoming toolchain
migration to nightly-2026-05-28. Dylint 6 works on the current pin
(nightly-2025-09-18) — the suite's own tests already build UI drivers with
dylint_testing6.0.1 — but 4.1.0 and 5.0.0 cannot build a driver on newernightlies:
dylint_driver≤ 5.0.0 fails to compile there becauseParseSess::env_depinfo/file_depinfowere removed upstream (E0609,verified empirically). Landing this first means the rolling release carries
6.0.1 dependency binaries before the pin flips, so consumer CI never sees a
driver that cannot build.
Review walkthrough
installer/dependency-binaries.toml— the single source of truth for theprebuilt dependency binaries; both entries move to 6.0.1. Changing this
file auto-triggers the dependency-binary rebuild leg of the rolling
release.
Makefile—CARGO_DYLINT_VERSION/DYLINT_LINK_VERSIONmove5.0.0 → 6.0.1 for local
cargo installpaths.installer/src/{deps/tests.rs,tests.rs}— mock command expectations thatassert the version sourced from the embedded manifest.
installer/src/dependency_binaries/{manifest.rs,install/tests.rs}—assertions against the embedded manifest, plus doc examples and inline
fixtures kept in step for consistency.
The Python workflow tests use their own fixture manifests and are
unaffected.
Validation
env -u WHITAKER make check-fmt— clean.env -u WHITAKER make lint— clean.env -u WHITAKER make test— full suite green.env -u WHITAKER make markdownlint— clean.builds and runs the rebuilt suite correctly on a toy crate, while 5.0.0
fails with E0609 on
ParseSessfields.