Skip to content

Commit 6749e87

Browse files
committed
Merge torrust#839: chore!: migrate workspace to Rust edition 2024
ed58e78 feat!: migrate workspace to Rust edition 2024 (Cameron Garnham) 460f518 refactor: remove `located-error` package, use `tracing` for error context (Cameron Garnham) Pull request description: ### Summary This PR completes two related housekeeping tasks that prepare the codebase for the next major release cycle: 1. **Remove the `located-error` package** — The first-party `torrust-index-located-error` crate is replaced by direct `tracing::error!` calls at error-construction sites. Error types in `config` and `web::api::server` are simplified from `LocatedError<'static, dyn Error + Send + Sync>` to plain `Arc<dyn Error + Send + Sync>` (`DynError`), eliminating a lifetime parameter and unnecessary `Arc` indirection. (See ADR-T-004.) 2. **Migrate the entire workspace to Rust edition 2024** — The edition is bumped from 2021 to 2024, the MSRV is raised from 1.83 to 1.85, and the workspace version goes from `3.1.0-develop` to `4.0.0-develop`. Key dependency upgrades include `jsonwebtoken` 9.3 → 10, `rand` 0.9 → 0.10, and the `rust-2024-compatibility` lint group is promoted from `warn` to `deny`. Import ordering across ~55 files is reformatted to edition-2024 style. (See ADR-T-005.) ### Breaking Changes - **MSRV raised to 1.85** — contributors and CI must use rustc 1.85+. - **Major version bump** — `4.0.0-develop` to reflect the edition change and removed package. - **`located-error` crate removed** — any downstream code depending on `torrust-index-located-error` must migrate to `tracing` or plain error types. ### Dependency Pin Status Most transitive pins from ADR-T-003 have been lifted thanks to the MSRV-aware resolver in edition 2024. A handful of pins remain for the `time` family and `psm` until their upstream crates support Rust 1.85 (details in ADR-T-005). ### Scope 68 files changed, ~920 insertions, ~1120 deletions (net reduction). The bulk of the diff is the deleted `located-error` package, Cargo.lock churn from dependency upgrades, and mechanical import reordering by `cargo fmt`. ACKs for top commit: da2ce7: ACK ed58e78 Tree-SHA512: 831f34cc7dc0d385d4c568fd29fb970a41cf3a343c11b14f1b5c1567d56a9a2e93b80f4a8b2efee0834a4ed2e643bcd720de414928e1f0336a736addcb9bf9ed
2 parents 3b9b5ac + ed58e78 commit 6749e87

69 files changed

Lines changed: 955 additions & 1119 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [4.0.0] - 2026-03-23
11+
12+
### Added
13+
14+
- ADR-T-004: Document rationale for removing `located-error` package.
15+
- ADR-T-005: Document rationale for Rust edition 2024 migration.
16+
17+
### Changed
18+
19+
- **BREAKING:** Raise MSRV from 1.83 to 1.85.
20+
- **BREAKING:** Migrate workspace to Rust edition 2024.
21+
- **BREAKING:** Bump workspace version from `3.1.0-develop` to `4.0.0-develop`.
22+
- Upgrade `jsonwebtoken` from 9.3 to 10 (with `rust_crypto` feature).
23+
- Upgrade `rand` from 0.9 to 0.10; rename `rand::Rng` to `rand::RngExt`.
24+
- Promote `rust-2024-compatibility` lint group from `warn` to `deny`.
25+
- Reformat imports across ~55 files to edition 2024 style.
26+
- Simplify error types in `config` and `web::api::server` — replace
27+
`LocatedError<'static, dyn Error + Send + Sync>` with `Arc<dyn Error + Send + Sync>`.
28+
- Emit `tracing::error!` events where `LocatedError` previously logged context.
29+
30+
### Removed
31+
32+
- **BREAKING:** Remove first-party `torrust-index-located-error` package
33+
(`packages/located-error/`). Use `tracing` for error-origin context instead.

0 commit comments

Comments
 (0)