Skip to content

Commit 30bfc60

Browse files
committed
refactor(located-error): [torrust#1823] rename torrust-tracker-located-error to torrust-located-error
Rename Cargo crate name in packages/located-error/Cargo.toml (T1). No workspace-level dep existed in root Cargo.toml (T2 is N/A). Update dep keys in 5 dependent Cargo.toml files (T3): packages/{configuration,axum-server,http-protocol,tracker-core,tracker-client}/Cargo.toml. Update 10 Rust source use statements from torrust_tracker_located_error:: to torrust_located_error:: across 9 files (T4). Update prose in AGENTS.md, packages/located-error/README.md, .github/workflows/deployment.yaml, docs/release_process.md, and two skill files under .github/skills/ (T5). cargo build --workspace, cargo test --workspace, and linter all all pass (T6/T7).
1 parent 1a140ae commit 30bfc60

24 files changed

Lines changed: 68 additions & 67 deletions

File tree

.github/skills/dev/git-workflow/release-new-version/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Check the
101101
ran successfully and the following crates were published:
102102

103103
- `torrust-tracker-contrib-bencode`
104-
- `torrust-tracker-located-error`
104+
- `torrust-located-error`
105105
- `torrust-tracker-primitives`
106106
- `torrust-clock`
107107
- `torrust-tracker-configuration`

.github/skills/dev/rust-code-quality/handle-errors-in-code/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ For errors that benefit from source location tracking, use the `located-error` p
6969

7070
```toml
7171
[dependencies]
72-
torrust-tracker-located-error = { workspace = true }
72+
torrust-located-error = { workspace = true }
7373
```
7474

7575
```rust
76-
use torrust_tracker_located_error::Located;
76+
use torrust_located_error::Located;
7777

7878
// Wraps any error with file and line information
7979
let err = Located(my_error).into();

.github/workflows/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
cargo publish -p torrust-tracker-configuration
7575
cargo publish -p torrust-tracker-contrib-bencode
7676
cargo publish -p torrust-tracker-events
77-
cargo publish -p torrust-tracker-located-error
77+
cargo publish -p torrust-located-error
7878
cargo publish -p torrust-tracker-metrics
7979
cargo publish -p torrust-tracker-primitives
8080
cargo publish -p torrust-tracker-swarm-coordination-registry

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ All packages live under `packages/`. The workspace version is `3.0.0-develop`.
6464
| `axum-http-tracker-server` | `torrust-tracker-axum-http-server` | `axum-*` | BitTorrent HTTP tracker server (BEP 3/23) |
6565
| `axum-rest-tracker-api-server` | `torrust-tracker-axum-rest-api-server` | `axum-*` | Management REST API server |
6666
| `axum-server` | `torrust-tracker-axum-server` | `axum-*` | Base Axum HTTP server infrastructure |
67-
| `clock` | `torrust-clock` | utilities | Mockable time source for deterministic testing |
67+
| `clock` | `torrust-clock` | utilities | Mockable time source for deterministic testing |
6868
| `configuration` | `torrust-tracker-configuration` | domain | Config file parsing, environment variables |
6969
| `events` | `torrust-tracker-events` | domain | Domain event definitions |
7070
| `http-protocol` | `bittorrent-http-tracker-protocol` | `*-protocol` | HTTP tracker protocol (BEP 3/23) parsing |
7171
| `http-tracker-core` | `bittorrent-http-tracker-core` | `*-core` | HTTP-specific tracker domain logic |
72-
| `located-error` | `torrust-tracker-located-error` | utilities | Diagnostic errors with source locations |
72+
| `located-error` | `torrust-located-error` | utilities | Diagnostic errors with source locations |
7373
| `metrics` | `torrust-metrics` | domain | Prometheus metrics integration |
7474
| `peer-id` | `bittorrent-peer-id` | domain | Peer ID parsing and formatting utilities |
7575
| `primitives` | `torrust-tracker-primitives` | domain | Core domain types (InfoHash, PeerId, ...) |

Cargo.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/issues/open/1823-1669-10-rename-torrust-tracker-located-error-to-torrust-located-error.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ priority: p2
66
github-issue: 1823
77
spec-path: docs/issues/open/1823-1669-10-rename-torrust-tracker-located-error-to-torrust-located-error.md
88
branch: 1823-rename-torrust-tracker-located-error-to-torrust-located-error
9-
related-pr: null
10-
last-updated-utc: 2026-05-21 17:15
9+
related-pr: 1824
10+
last-updated-utc: 2026-05-22 08:09
1111
semantic-links:
1212
skill-links:
1313
- create-issue
@@ -173,20 +173,20 @@ only after T10 is complete.
173173

174174
Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`.
175175

176-
| ID | Status | Task | Notes / Expected Output |
177-
| --- | ------ | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
178-
| T1 | TODO | Rename `name` in `packages/located-error/Cargo.toml` | `name = "torrust-located-error"` |
179-
| T2 | TODO | Update root `Cargo.toml` workspace dependency key | `torrust-located-error = { version = ..., path = "packages/located-error" }` |
180-
| T3 | TODO | Update all 5 dependent package `Cargo.toml` files (excluding root — see T2) | Replace `torrust-tracker-located-error` key with `torrust-located-error` |
181-
| T4 | TODO | Update Rust source `use` / path references (`torrust_tracker_located_error::``torrust_located_error::`) | Affects package sources and integration tests |
182-
| T5 | TODO | Update prose in `packages/AGENTS.md`, `AGENTS.md`, `docs/packages.md`, `packages/located-error/README.md` | Crate name and any inline code snippets |
183-
| T6 | TODO | Run `cargo build --workspace` and `cargo test --workspace` | Clean build and all tests pass |
184-
| T7 | TODO | Run `linter all` | Exit code `0` |
185-
| T8 | TODO | Publish `torrust-located-error` on crates.io | Successful `cargo publish -p torrust-located-error` |
186-
| T9 | TODO | Add deprecation notice to `torrust-tracker-located-error` on crates.io | README / description points to `torrust-located-error`; do **not** yank yet |
187-
| T10 | TODO | Check and migrate any downstream Torrust repositories using `torrust-tracker-located-error` | Companion PRs in downstream repos merged; must be complete before T11 |
188-
| T11 | TODO | Yank all versions of `torrust-tracker-located-error` on crates.io | All versions yanked; T10 must be complete first |
189-
| T12 | TODO | Update EPIC #1669 `Package Inventory` and `Desired Package State` tables | Move `torrust-located-error` from `torrust-tracker-` to `torrust-` prefix |
176+
| ID | Status | Task | Notes / Expected Output |
177+
| --- | ------ | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
178+
| T1 | DONE | Rename `name` in `packages/located-error/Cargo.toml` | `name = "torrust-located-error"` |
179+
| T2 | N/A | Update root `Cargo.toml` workspace dependency key | No workspace-level dep existed; all 5 packages reference the crate directly |
180+
| T3 | DONE | Update all 5 dependent package `Cargo.toml` files (excluding root — see T2) | Replace `torrust-tracker-located-error` key with `torrust-located-error` |
181+
| T4 | DONE | Update Rust source `use` / path references (`torrust_tracker_located_error::``torrust_located_error::`) | Affects package sources and integration tests |
182+
| T5 | DONE | Update prose in `packages/AGENTS.md`, `AGENTS.md`, `docs/packages.md`, `packages/located-error/README.md` | Crate name and any inline code snippets |
183+
| T6 | DONE | Run `cargo build --workspace` and `cargo test --workspace` | Clean build and all tests pass |
184+
| T7 | DONE | Run `linter all` | Exit code `0` |
185+
| T8 | TODO | Publish `torrust-located-error` on crates.io | Successful `cargo publish -p torrust-located-error` |
186+
| T9 | TODO | Add deprecation notice to `torrust-tracker-located-error` on crates.io | README / description points to `torrust-located-error`; do **not** yank yet |
187+
| T10 | TODO | Check and migrate any downstream Torrust repositories using `torrust-tracker-located-error` | Companion PRs in downstream repos merged; must be complete before T11 |
188+
| T11 | TODO | Yank all versions of `torrust-tracker-located-error` on crates.io | All versions yanked; T10 must be complete first |
189+
| T12 | TODO | Update EPIC #1669 `Package Inventory` and `Desired Package State` tables | Move `torrust-located-error` from `torrust-tracker-` to `torrust-` prefix |
190190

191191
**Dependent packages to update in T3** (5 files; root `Cargo.toml` is handled in T2):
192192

@@ -200,12 +200,12 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`.
200200

201201
### Workflow Checkpoints
202202

203-
- [ ] Spec drafted in `docs/issues/drafts/`
204-
- [ ] Spec reviewed and approved by user/maintainer
205-
- [ ] GitHub issue created and issue number added to this spec
206-
- [ ] Spec moved to `docs/issues/open/` with issue number prefix
207-
- [ ] Implementation completed
208-
- [ ] Automatic verification completed (`linter all`, `cargo test --workspace`)
203+
- [x] Spec drafted in `docs/issues/drafts/`
204+
- [x] Spec reviewed and approved by user/maintainer
205+
- [x] GitHub issue created and issue number added to this spec
206+
- [x] Spec moved to `docs/issues/open/` with issue number prefix
207+
- [x] Implementation completed
208+
- [x] Automatic verification completed (`linter all`, `cargo test --workspace`)
209209
- [ ] Manual verification scenarios executed and recorded
210210
- [ ] Acceptance criteria reviewed after implementation and updated with evidence
211211
- [ ] `torrust-located-error` published on crates.io; deprecation notice added to old name
@@ -219,6 +219,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`.
219219
- 2026-05-15 12:00 UTC - josecelano - Spec drafted as subissue of EPIC #1669
220220
- 2026-05-21 17:00 UTC - josecelano - GitHub issue #1823 created and linked as sub-issue of #1669; spec moved to `docs/issues/open/`
221221
- 2026-05-21 17:15 UTC - josecelano - Added pre-implementation "Keep vs. Delete" analysis; awaiting reviewer decision before T1 starts
222+
- 2026-05-22 08:09 UTC - josecelano - Rename implemented: T1 (Cargo.toml name), T3 (5 dependent Cargo.toml dep keys), T4 (10 Rust source use statements), T5 (README, AGENTS.md, deployment.yaml, release_process.md, 2 skills); T2 is N/A (no workspace-level dep existed). T6 (`cargo build --workspace`, `cargo test --workspace`) and T7 (`linter all`) all pass. Draft PR #1824 open.
222223

223224
## Acceptance Criteria
224225

@@ -252,9 +253,9 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`.
252253

253254
Status values: `TODO`, `IN_PROGRESS`, `DONE`, `FAILED`, `BLOCKED`.
254255

255-
| ID | Scenario | Command / Steps | Expected Result | Status | Evidence |
256-
| --- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | ------ | -------- |
257-
| M1 | No stale references to old crate name | `grep -r "torrust-tracker-located-error\|torrust_tracker_located_error" . --include="*.toml" --include="*.rs"` | Zero matches | TODO | |
258-
| M2 | New crate name visible on crates.io | Visit `https://crates.io/crates/torrust-located-error` | Crate page exists and shows latest version | TODO | |
259-
| M3 | Old crate name yanked | Visit `https://crates.io/crates/torrust-tracker-located-error` | All versions show "yanked" | TODO | |
260-
| M4 | Downstream Torrust repositories clean | Check `torrust-index` and other Torrust repos for `torrust-tracker-located-error` dependency | No references found after T10 | TODO | |
256+
| ID | Scenario | Command / Steps | Expected Result | Status | Evidence |
257+
| --- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | ------ | --------------------------------- |
258+
| M1 | No stale references to old crate name | `grep -r "torrust-tracker-located-error\|torrust_tracker_located_error" . --include="*.toml" --include="*.rs"` | Zero matches | DONE | Zero matches confirmed 2026-05-22 |
259+
| M2 | New crate name visible on crates.io | Visit `https://crates.io/crates/torrust-located-error` | Crate page exists and shows latest version | TODO | |
260+
| M3 | Old crate name yanked | Visit `https://crates.io/crates/torrust-tracker-located-error` | All versions show "yanked" | TODO | |
261+
| M4 | Downstream Torrust repositories clean | Check `torrust-index` and other Torrust repos for `torrust-tracker-located-error` dependency | No references found after T10 | TODO | |

docs/release_process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ git push --tags torrust
8080
Make sure the [deployment](https://github.com/torrust/torrust-tracker/actions/workflows/deployment.yaml) workflow was successfully executed and the new version for the following crates were published:
8181

8282
- [torrust-tracker-contrib-bencode](https://crates.io/crates/torrust-tracker-contrib-bencode)
83-
- [torrust-tracker-located-error](https://crates.io/crates/torrust-tracker-located-error)
83+
- [torrust-located-error](https://crates.io/crates/torrust-located-error)
8484
- [torrust-tracker-primitives](https://crates.io/crates/torrust-tracker-primitives)
8585
- [torrust-clock](https://crates.io/crates/torrust-clock)
8686
- [torrust-tracker-configuration](https://crates.io/crates/torrust-tracker-configuration)

packages/axum-server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ thiserror = "2"
2525
tokio = { version = "1", features = [ "macros", "net", "rt-multi-thread", "signal", "sync" ] }
2626
torrust-server-lib = { version = "3.0.0-develop", path = "../server-lib" }
2727
torrust-tracker-configuration = { version = "3.0.0-develop", path = "../configuration" }
28-
torrust-tracker-located-error = { version = "3.0.0-develop", path = "../located-error" }
28+
torrust-located-error = { version = "3.0.0-develop", path = "../located-error" }
2929
tower = { version = "0", features = [ "timeout" ] }
3030
tracing = "0"
3131

packages/axum-server/src/tsl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use std::sync::Arc;
33

44
use axum_server::tls_rustls::RustlsConfig;
55
use thiserror::Error;
6+
use torrust_located_error::{DynError, LocatedError};
67
use torrust_tracker_configuration::TslConfig;
7-
use torrust_tracker_located_error::{DynError, LocatedError};
88
use tracing::instrument;
99

1010
/// Error returned by the Bootstrap Process.

packages/configuration/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ serde_json = { version = "1", features = [ "preserve_order" ] }
2323
serde_with = "3"
2424
thiserror = "2"
2525
toml = "0"
26-
torrust-tracker-located-error = { version = "3.0.0-develop", path = "../located-error" }
26+
torrust-located-error = { version = "3.0.0-develop", path = "../located-error" }
2727
torrust-tracker-primitives = { version = "3.0.0-develop", path = "../primitives" }
2828
tracing = "0"
2929
tracing-subscriber = { version = "0", features = [ "json" ] }

0 commit comments

Comments
 (0)