You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename the Cargo crate torrust-tracker-clock to torrust-clock to reflect that it is a generic, tracker-independent utility that can be used in any Rust project (e.g., torrust-index).
Background
The clock package (packages/clock) provides a mockable time abstraction for deterministic testing. It contains no tracker-specific logic and its usefulness extends beyond this repository — for example, torrust-index already contains copied clock code.
The torrust-tracker- prefix implies a tracker-only scope that does not reflect the crate's actual purpose. The rename:
Makes the crate identity match its scope.
Signals to downstream users that it is reusable outside the tracker.
Prepares it for potential extraction to a standalone repository in a future cycle (see SI-13).
Note: Publishing torrust-clock on crates.io and handling the old name (torrust-tracker-clock) is deferred to SI-13 (extract torrust-clock to standalone repository). At that point torrust-index will also be updated to depend on torrust-clock directly.
This issue is a subissue of EPIC #1669 (Overhaul: Packages) — SI-09.
Scope
In Scope
Rename the name field in packages/clock/Cargo.toml.
Update all Cargo.toml files in the workspace that reference torrust-tracker-clock.
Update all Rust source files using torrust_tracker_clock:: to torrust_clock::.
Update prose in packages/AGENTS.md, AGENTS.md, docs/packages.md, and packages/clock/README.md.
Goal
Rename the Cargo crate
torrust-tracker-clocktotorrust-clockto reflect that it is a generic, tracker-independent utility that can be used in any Rust project (e.g.,torrust-index).Background
The
clockpackage (packages/clock) provides a mockable time abstraction for deterministic testing. It contains no tracker-specific logic and its usefulness extends beyond this repository — for example,torrust-indexalready contains copied clock code.The
torrust-tracker-prefix implies a tracker-only scope that does not reflect the crate's actual purpose. The rename:This issue is a subissue of EPIC #1669 (Overhaul: Packages) — SI-09.
Scope
In Scope
namefield inpackages/clock/Cargo.toml.Cargo.tomlfiles in the workspace that referencetorrust-tracker-clock.torrust_tracker_clock::totorrust_clock::.packages/AGENTS.md,AGENTS.md,docs/packages.md, andpackages/clock/README.md.Package InventoryandDesired Package Statetables.Out of Scope
torrust-clockon crates.io — deferred to SI-13.torrust-tracker-clockon crates.io — deferred to SI-13.torrust-indexto usetorrust-clock— deferred to SI-13.Implementation Plan
nameinpackages/clock/Cargo.tomlCargo.tomlworkspace dependency keyCargo.tomlfilesuse/ path references (torrust_tracker_clock::→torrust_clock::)packages/AGENTS.md,AGENTS.md,docs/packages.md,packages/clock/README.mdcargo build --workspaceandcargo test --workspacelinter allPackage InventoryandDesired Package StatetablesDependent packages for T3 (10 files):
packages/axum-health-check-api-server/Cargo.tomlpackages/axum-http-tracker-server/Cargo.tomlpackages/axum-rest-tracker-api-server/Cargo.tomlpackages/http-protocol/Cargo.tomlpackages/http-tracker-core/Cargo.tomlpackages/swarm-coordination-registry/Cargo.tomlpackages/tracker-core/Cargo.tomlpackages/torrent-repository-benchmarking/Cargo.tomlpackages/udp-tracker-core/Cargo.tomlpackages/udp-tracker-server/Cargo.tomlAcceptance Criteria
packages/clock/Cargo.tomldeclaresname = "torrust-clock".Cargo.tomlfile in the workspace referencestorrust-tracker-clock.torrust_tracker_clock::.cargo build --workspacesucceeds with zero errors.cargo test --workspacepasses with zero failures.linter allexits with code0.packages/AGENTS.md,AGENTS.md,docs/packages.md, andpackages/clock/README.mdreflect the new crate name.Desired Package Statetable liststorrust-clock.Local Spec
docs/issues/open/1821-1669-09-rename-torrust-tracker-clock-to-torrust-clock.md
Related to #1669