Skip to content

chore(msrv): bump workspace rust-version from 1.85 to 1.88#1815

Merged
josecelano merged 3 commits into
torrust:developfrom
josecelano:1787-evaluate-msrv-bump
May 20, 2026
Merged

chore(msrv): bump workspace rust-version from 1.85 to 1.88#1815
josecelano merged 3 commits into
torrust:developfrom
josecelano:1787-evaluate-msrv-bump

Conversation

@josecelano
Copy link
Copy Markdown
Member

Closes #1787

Summary

Bumps rust-version in Cargo.toml from 1.85 to 1.88.

Motivation

cargo update with MSRV 1.85 was downgrading already-present packages (bollard,
tonic, testcontainers, serde_with, time, ureq, etc.) because those packages
already in the lockfile require Rust > 1.85. The MSRV-aware resolver (stable
since Rust 1.76) only selects package versions compatible with the declared
rust-version.

A dry-run at 1.86, 1.87, and 1.88 showed that 1.88 is the minimum floor that
produces zero downgrades
on the current lockfile. It also aligns with the MSRV
used in torrust-index.

Changes

  • Cargo.toml: rust-version = "1.85""1.88"
  • 5 clippy collapsible_if fixes: let_chains (RFC 2679) was stabilised in
    Rust 1.88, so clippy now expects nested if/if let patterns to be collapsed
    with && let-chain syntax. Fixed in:
    • packages/tracker-core/tests/common/test_env.rs
    • packages/tracker-core/tests/integration.rs
    • packages/udp-tracker-server/src/statistics/event/handler/error.rs
    • src/console/ci/compose.rs
    • src/console/ci/e2e/logs_parser.rs
  • AGENTS.md: updated MSRV reference and added MSRV policy note
  • .github/skills/dev/maintenance/setup-dev-environment/SKILL.md: updated MSRV reference
  • docs/issues/open/1787-evaluate-msrv-bump.md: issue spec marked done, Policy Decision section added
  • project-words.txt: added ureq (spell-check dictionary)

Policy Decision

Until the bittorrent-* crates are extracted as standalone libraries (#1669),
a single workspace MSRV applies. Once they are extracted:

  • Tracker application (torrust-tracker-*, main binary): track a recent
    stable Rust version.
  • bittorrent-* libraries: carry the minimum MSRV needed for external
    consumer compatibility.

A follow-up issue will be opened when #1669 closes to apply the split policy.

- 1.88 is the minimum floor that avoids `cargo update` regressions on the
  current lockfile (bollard, tonic, testcontainers, serde_with, time, ureq, etc.
  all require Rust > 1.85; 1.86 and 1.87 still produce downgrades)
- Aligns with torrust-index, which also uses rust-version = "1.88"
- Stabilised let_chains (RFC 2679) triggered 5 collapsible_if clippy fixes
  across tracker-core, udp-tracker-server, and src/console
- MSRV policy (app tracks latest stable post-extraction; bittorrent-* libraries
  keep minimum MSRV for external consumer compatibility) documented in AGENTS.md
  and issue spec torrust#1787
@josecelano josecelano requested a review from a team as a code owner May 20, 2026 17:16
Copilot AI review requested due to automatic review settings May 20, 2026 17:16
@josecelano josecelano self-assigned this May 20, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR raises the workspace Minimum Supported Rust Version (MSRV) to Rust 1.88 to prevent MSRV-aware dependency resolution from downgrading already-pinned lockfile dependencies, and updates code/docs accordingly.

Changes:

  • Bump workspace rust-version from 1.85 → 1.88.
  • Apply clippy-driven collapsible_if refactors using let-chains (now stable with the new MSRV).
  • Update MSRV references in documentation and add ureq to the spell-check dictionary.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Cargo.toml Bumps workspace rust-version to 1.88 (propagated via workspace.package).
packages/tracker-core/tests/common/test_env.rs Refactors retry loop condition using let-chains (currently introduces a compile issue).
packages/tracker-core/tests/integration.rs Collapses nested conditionals into a let-chain in an integration test retry loop.
packages/udp-tracker-server/src/statistics/event/handler/error.rs Collapses nested conditionals into a let-chain for metrics labeling logic.
src/console/ci/compose.rs Collapses nested conditionals into a let-chain while waiting for compose port mappings.
src/console/ci/e2e/logs_parser.rs Collapses nested conditionals into a let-chain when parsing health-check URLs.
AGENTS.md Updates MSRV reference and adds an MSRV policy note.
.github/skills/dev/maintenance/setup-dev-environment/SKILL.md Updates MSRV reference in dev environment setup guidance.
docs/issues/open/1787-evaluate-msrv-bump.md Marks the issue spec as done and records the policy decision/rationale (has internal consistency issues).
project-words.txt Adds ureq to the project dictionary (kept in sorted order).
Comments suppressed due to low confidence (2)

docs/issues/open/1787-evaluate-msrv-bump.md:140

  • The Implementation Plan lists T5 (“Verify CI passes”) as TODO, but the workflow checkpoints below mark “Automatic verification completed” as done. Please make these consistent (either mark T5 as DONE and add evidence, or revert the workflow checkpoint if CI hasn’t been run yet).
| ID  | Status | Task                                                                | Notes / Expected Output                                                                                                                                                                    |
| --- | ------ | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| T1  | DONE   | Decide MSRV policy (track latest stable vs. pin conservative floor) | Policy documented in "Policy Decision" section: 1.88 for the whole workspace now; split policy (app tracks latest stable, extracted libraries keep minimum MSRV) to be applied post-#1669. |
| T2  | DONE   | Update `rust-version` in root `Cargo.toml`                          | Changed from `"1.85"` to `"1.88"`                                                                                                                                                          |
| T3  | DONE   | Update `AGENTS.md` MSRV reference                                   | Updated from `1.85` to `1.88`                                                                                                                                                              |
| T4  | DONE   | Update setup-dev-environment SKILL.md MSRV reference                | Updated from `1.85` to `1.88`                                                                                                                                                              |
| T5  | TODO   | Verify CI passes                                                    | Full quality gate (`linter all`, tests, pre-push hook)                                                                                                                                     |

docs/issues/open/1787-evaluate-msrv-bump.md:202

  • The Acceptance Verification table marks AC1–AC4 as DONE, but the Acceptance Criteria checklist above (AC1–AC4) remains unchecked. Please update one of these so the spec doesn’t show contradictory completion status.
| AC ID | Status (`TODO`/`DONE`) | Evidence                                                                                                      |
| ----- | ---------------------- | ------------------------------------------------------------------------------------------------------------- |
| AC1   | DONE                   | Policy documented in "Policy Decision" section; split policy for post-extraction recorded as follow-up action |
| AC2   | DONE                   | `rust-version = "1.88"` in `Cargo.toml`                                                                       |
| AC3   | DONE                   | `AGENTS.md` updated to MSRV 1.88                                                                              |
| AC4   | DONE                   | `setup-dev-environment` SKILL.md updated to MSRV 1.88                                                         |
| AC5   | TODO                   |                                                                                                               |
| AC6   | TODO                   |                                                                                                               |
| AC7   | TODO                   |                                                                                                               |

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/tracker-core/tests/common/test_env.rs
Comment thread docs/issues/open/1787-evaluate-msrv-bump.md Outdated
Comment thread docs/issues/closed/1787-evaluate-msrv-bump.md
@josecelano
Copy link
Copy Markdown
Member Author

ACK 7462511

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 64.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.70%. Comparing base (e3f6658) to head (7462511).

Files with missing lines Patch % Lines
src/console/ci/compose.rs 0.00% 8 Missing ⚠️
...acker-server/src/statistics/event/handler/error.rs 91.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1815   +/-   ##
========================================
  Coverage    77.70%   77.70%           
========================================
  Files          379      379           
  Lines        28607    28605    -2     
  Branches     28607    28605    -2     
========================================
- Hits         22228    22227    -1     
+ Misses        6066     6064    -2     
- Partials       313      314    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano josecelano merged commit 25ade29 into torrust:develop May 20, 2026
26 of 27 checks passed
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.

chore: evaluate and update workspace MSRV above 1.85

2 participants