Part of EPIC: #1978 — Configuration Overhaul (schema v3.0.0)
EPIC position: Subissue #9 of 9 — must be last. Depends on ALL other subissues being complete.
Spec: docs/issues/drafts/configuration-overhaul-final-cleanup.md
Goal
After all v3 schema changes are implemented, perform the final cleanup:
- Migrate all consumers from global re-exports (
pub type Core = v2_0_0::core::Core) to explicit versioned imports (use torrust_tracker_configuration::v3_0_0::core::Core)
- Remove the global re-exports from
packages/configuration/src/lib.rs
- Remove the crate-root
packages/configuration/src/logging.rs (now duplicated inside v2_0_0/ and v3_0_0/)
- Apply any other cleanup discovered during the EPIC implementation
Background
The packages/configuration/src/lib.rs currently re-exports all v2 types as global aliases. These re-exports silently couple consumers to a specific schema version. When the EPIC switches the default to v3, consumers that use torrust_tracker_configuration::Core would silently get a different type — potentially breaking at compile time in confusing ways.
The decision is to remove all global re-exports and force consumers to import from explicit versioned paths. This is a breaking change appropriate for the major version bump accompanying this EPIC.
Scope
In Scope
- Migrate all ~30 consumer files from global re-exports to explicit
v3_0_0 imports
- Remove global type aliases from
packages/configuration/src/lib.rs
- Remove crate-root
packages/configuration/src/logging.rs
- Ensure all tests pass after migration
- Any additional cleanup items discovered during EPIC implementation
Out of Scope
- Removing
v2_0_0/ module (it stays deprecated for backward compatibility)
- Changes to the v3 schema itself (already done in previous subissues)
Implementation Plan
| ID |
Task |
Notes |
| T1 |
Migrate all consumer imports to explicit v3_0_0 paths |
~30 files; see Consumer Migration Map in spec |
| T2 |
Remove global type aliases from lib.rs |
pub type Configuration = ... etc. |
| T3 |
Remove crate-root logging.rs |
Already copied into v2_0_0/ and v3_0_0/ |
| T4 |
Remove pub mod logging; from lib.rs |
Or redirect to versioned module if needed |
| T5 |
Apply any additional cleanup discovered during EPIC |
Document in progress log |
| T6 |
Run linter all and full test suite |
|
Acceptance Criteria
Part of EPIC: #1978 — Configuration Overhaul (schema v3.0.0)
EPIC position: Subissue #9 of 9 — must be last. Depends on ALL other subissues being complete.
Spec:
docs/issues/drafts/configuration-overhaul-final-cleanup.mdGoal
After all v3 schema changes are implemented, perform the final cleanup:
pub type Core = v2_0_0::core::Core) to explicit versioned imports (use torrust_tracker_configuration::v3_0_0::core::Core)packages/configuration/src/lib.rspackages/configuration/src/logging.rs(now duplicated insidev2_0_0/andv3_0_0/)Background
The
packages/configuration/src/lib.rscurrently re-exports all v2 types as global aliases. These re-exports silently couple consumers to a specific schema version. When the EPIC switches the default to v3, consumers that usetorrust_tracker_configuration::Corewould silently get a different type — potentially breaking at compile time in confusing ways.The decision is to remove all global re-exports and force consumers to import from explicit versioned paths. This is a breaking change appropriate for the major version bump accompanying this EPIC.
Scope
In Scope
v3_0_0importspackages/configuration/src/lib.rspackages/configuration/src/logging.rsOut of Scope
v2_0_0/module (it stays deprecated for backward compatibility)Implementation Plan
v3_0_0pathslib.rspub type Configuration = ...etc.logging.rsv2_0_0/andv3_0_0/pub mod logging;fromlib.rslinter alland full test suiteAcceptance Criteria
v3_0_0paths (no global re-export usage remains)packages/configuration/src/lib.rspackages/configuration/src/logging.rsremovedv2_0_0module remains available (deprecated but not removed)linter allexits with code0