Commit 6749e87
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: 831f34cc7dc0d385d4c568fd29fb970a41cf3a343c11b14f1b5c1567d56a9a2e93b80f4a8b2efee0834a4ed2e643bcd720de414928e1f0336a736addcb9bf9ed69 files changed
Lines changed: 955 additions & 1119 deletions
File tree
- adr
- packages
- located-error
- src
- render-text-as-image
- examples
- src
- tests
- src
- bin
- config
- v2
- console/cronjobs
- databases
- services
- tests
- cache
- config
- models
- services
- ui
- upgrades/from_v1_0_0_to_v2_0_0/databases
- utils
- web/api
- client/v1
- server
- v1
- contexts
- about
- category
- proxy
- settings
- tag
- torrent
- user
- tests
- common
- contexts
- category
- tag
- torrent
- user
- e2e
- web/api/v1/contexts
- torrent
- user
- environments
- upgrades/from_v1_0_0_to_v2_0_0
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments