Skip to content

chore: bump MSRV to 1.91 and refresh dependencies#457

Open
sandersaares wants to merge 4 commits into
mainfrom
chore/msrv-1.91
Open

chore: bump MSRV to 1.91 and refresh dependencies#457
sandersaares wants to merge 4 commits into
mainfrom
chore/msrv-1.91

Conversation

@sandersaares
Copy link
Copy Markdown
Member

@sandersaares sandersaares commented May 28, 2026

Bumps the workspace MSRV from 1.88 -> 1.91 (Rust 1.91 was released 2025-10-30), refreshes Cargo.lock via cargo generate-lockfile, and applies modernizations unlocked by the new toolchain.

Note

MSRV 1.93 will follow soon (days/weeks) as a separate PR. Splitting the jump to avoid taking large MSRV steps in one go.

Workspace / toolchain

  • rust-version = "1.91" in Cargo.toml
  • RUST_MSRV=1.91 in constants.env
  • Cargo.lock refreshed (410 packages re-resolved)

Dependency-bump fallout

  • http 1.2.0 -> 1.4.1: PathAndQuery::try_from now rejects inputs without a leading slash at parse time. Workspace http dependency pinned to 1.4.0 so this stricter validation is a hard contract; redundant BasePath pre-validation removed; tests that exercised the old lenient behavior trimmed; one error-message assertion relaxed to check the stable error label instead.
  • darling no longer triggers clippy::needless_continue in its macro expansion; stale #[expect(...)] block removed in templated_uri_macros_impl.
  • Clippy lint renamed: clippy::unchecked_time_subtraction -> clippy::unchecked_duration_subtraction (tick).
  • Clippy 1.91 now flags assert!(result.is_err()) via clippy::assertions_on_result_states and an additional redundant Clone in a templated_uri test; both fixed in place.

Rust 1.91 modernizations

  • Replaced Duration::from_secs(3600 | 86400 | 172_800) with the new const fn Duration::from_hours(N) across cachet, seatbelt, and tick (sources, tests, doctests, examples).

Other 1.89/1.90/1.91 APIs (Result::flatten, BTreeMap::extract_if, str::ceil_char_boundary/floor_char_boundary, PanicHookInfo::payload_as_str) were considered but no good candidates exist in the codebase at this time.

Verification

  • cargo +1.91 check --workspace --all-features --all-targets --locked ok
  • cargo +1.91 clippy --workspace --all-targets --all-features --locked -- -D warnings ok
  • cargo +1.91 test --workspace --all-features --locked --no-fail-fast ok (164 test suites, 0 failures)
  • just format, just readme, just spellcheck ok

sandersaares and others added 2 commits May 28, 2026 16:48
Bumps the workspace MSRV from 1.88 to 1.91 (released 2025-10-30),
refreshes Cargo.lock via `cargo generate-lockfile`, and applies a
small set of modernizations unlocked by the new toolchain.

Workspace / toolchain
- `rust-version = "1.91"` in `Cargo.toml`.
- `RUST_MSRV=1.91` in `constants.env`.
- Lockfile refreshed (410 packages re-resolved).

Dependency-bump fallout
- `http` 1.2.0 -> 1.4.1: `PathAndQuery::try_from` now rejects
  inputs without a leading slash at parse time. Pinned the workspace
  `http` dependency to `1.4.0` so this stricter validation is a
  hard contract, removed the (now redundant) test cases that exercised
  the old lenient behavior, and relaxed one error-message assertion to
  check the stable error label instead.
- `darling` no longer triggers `clippy::needless_continue` in its
  macro expansion; removed a stale `#[expect(...)]` block in
  `templated_uri_macros_impl`.
- Clippy lint renamed: `clippy::unchecked_time_subtraction` ->
  `clippy::unchecked_duration_subtraction` (`tick`).
- Clippy 1.91 now flags `assert!(result.is_err())` via
  `clippy::assertions_on_result_states` and an additional redundant
  `Clone` in a `templated_uri` test; both fixed in place.

Rust 1.91 modernizations
- Replaced `Duration::from_secs(3600|86400|172_800)` with the new
  `const fn` `Duration::from_hours(N)` across `cachet`,
  `seatbelt`, and `tick` (sources, tests, doctests, examples).

Other 1.89/1.90/1.91 APIs (`Result::flatten`, `BTreeMap::extract_if`,
`str::ceil_char_boundary` / `floor_char_boundary`,
`PanicHookInfo::payload_as_str`) were considered but no good candidates
exist in the codebase at this time.

Verification
- `cargo +1.91 check --workspace --all-features --all-targets --locked`
- `cargo +1.91 clippy --workspace --all-targets --all-features --locked -- -D warnings`
- `cargo +1.91 test --workspace --all-features --locked --no-fail-fast`
- `just format`, `just readme`, `just spellcheck`

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (5a6eecd) to head (498970b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #457   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         305      305           
  Lines       23698    23670   -28     
=======================================
- Hits        23698    23670   -28     

☔ 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.

…e for 1.93 clippy

Local development used 1.91 clippy which differs from CI (1.93):
- `clippy::needless_continue` is still triggered by `darling` macro
  expansion on 1.93; restore the module-level `#[expect(...)]`.
- `clippy::unchecked_duration_subtraction` is the canonical name on
  1.91 only; on 1.93 it is renamed back to
  `clippy::unchecked_time_subtraction`. Use the 1.93 name to match
  the CI clippy run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sandersaares sandersaares marked this pull request as ready for review May 28, 2026 14:50
Copilot AI review requested due to automatic review settings May 28, 2026 14:50
Copy link
Copy Markdown
Contributor

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 bumps the workspace MSRV to Rust 1.91, refreshes dependency resolution, and updates code/tests/docs for dependency and toolchain behavior changes.

Changes:

  • Updates workspace Rust version constants and the http workspace dependency floor.
  • Refreshes Cargo.lock across transitive dependencies.
  • Modernizes hour-based Duration::from_secs(...) usages to Duration::from_hours(...) and adjusts templated URI tests/docs for stricter http parsing.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Cargo.toml Bumps workspace MSRV and http dependency version.
Cargo.lock Refreshes resolved dependency versions.
constants.env Updates the MSRV constant used by automation.
crates/tick/src/system_time_ext.rs Updates doctest duration construction.
crates/tick/src/fmt/mod.rs Updates module documentation example duration construction.
crates/tick/src/fmt/iso_8601.rs Updates tests to use Duration::from_hours.
crates/tick/src/fmt/rfc_2822.rs Updates test duration construction.
crates/tick/examples/data.rs Updates cached-data expiration constant.
crates/cachet/src/refresh.rs Updates refresh test duration construction.
crates/cachet/src/wrapper.rs Updates expiration test duration construction.
crates/cachet/tests/builder.rs Updates builder test TTL duration construction.
crates/cachet/benches/refresh.rs Updates benchmark refresh duration construction.
crates/seatbelt/src/retry/backoff.rs Updates retry backoff tests to use hour-based durations.
crates/templated_uri/src/base_uri.rs Updates docs/tests for stricter path parsing behavior.
crates/templated_uri/src/base_path.rs Adjusts error assertion and removes invalid no-leading-slash path test case.
crates/templated_uri/src/uri.rs Removes no-leading-slash PathAndQuery test cases invalid under newer http.
crates/templated_uri/README.md Regenerates dependency metadata and http links.
crates/http_extensions/README.md Regenerates http dependency links.
crates/multitude/README.md Regenerates dependency metadata and documentation links.

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

Comment thread Cargo.toml
[workspace.package]
edition = "2024"
rust-version = "1.88"
rust-version = "1.91"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This concern is already addressed in commit 894e2893 and the static-analysis CI matrix is green. The lint-name direction is actually inverted in this comment:

  • Clippy 1.91 uses clippy::unchecked_duration_subtraction as the canonical name; unchecked_time_subtraction is unknown on 1.91.
  • Clippy 1.93 reverts to clippy::unchecked_time_subtraction as canonical; unchecked_duration_subtraction triggers renamed_and_removed_lints on 1.93.

CI's static-analysis job runs clippy on RUST_LATEST (1.93), not on MSRV, so we use the 1.93 name (unchecked_time_subtraction). Plain cargo build on 1.91 (MSRV) accepts the 1.93 name without complaint because rustc doesn't fire clippy tool lints itself.

Comment thread crates/multitude/README.md Outdated
Comment on lines +392 to +397
[__link13]: strings::format!
[__link14]: https://docs.rs/multitude/0.1.0/multitude/?search=strings::RcUtf16Str
[__link15]: https://docs.rs/multitude/0.1.0/multitude/?search=strings::ArcUtf16Str
[__link16]: https://docs.rs/multitude/0.1.0/multitude/?search=strings::BoxUtf16Str
[__link17]: https://docs.rs/multitude/0.1.0/multitude/?search=strings::Utf16String
[__link18]: https://docs.rs/multitude/0.1.0/multitude/?search=strings::format_utf16
[__link18]: strings::format_utf16!
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 498970b. The bare strings::format! / strings::format_utf16! link targets were a regression caused by my local cargo-doc2readme being 0.6.3, while the project pins 0.6.4 (constants.env). Reinstalled the correct version and regenerated.

Comment thread crates/multitude/README.md Outdated
Comment on lines +429 to +430
[__link47]: strings::format!
[__link48]: strings::format_utf16!
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 498970b. The bare strings::format! / strings::format_utf16! link targets were a regression caused by my local cargo-doc2readme being 0.6.3, while the project pins 0.6.4 (constants.env). Reinstalled the correct version and regenerated.

Comment thread crates/multitude/README.md Outdated
[__link72]: https://docs.rs/multitude/0.1.0/multitude/?search=strings::BoxUtf16Str
[__link73]: https://docs.rs/multitude/0.1.0/multitude/?search=strings::Utf16String
[__link74]: https://docs.rs/multitude/0.1.0/multitude/?search=strings::format_utf16
[__link74]: strings::format_utf16!
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 498970b. The bare strings::format! / strings::format_utf16! link targets were a regression caused by my local cargo-doc2readme being 0.6.3, while the project pins 0.6.4 (constants.env). Reinstalled the correct version and regenerated.

Local just readme run used cargo-doc2readme 0.6.3 which produced
broken bare `strings::format!` / `strings::format_utf16!` link
targets for macro references. Re-running with the project-pinned
0.6.4 (constants.env) restores the proper docs.rs URLs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

2 participants