Skip to content

Commit 988678b

Browse files
committed
Merge #1887: refactor: migrate peer-id to published torrust-peer-id 0.1.0
f0f651f fix: remove peer-id references from Containerfile (Jose Celano) f4cdfac refactor: restore deprecated peer_id module for backwards compatibility (Jose Celano) dac713b docs: link PR #1887 in issue #1884 spec (Jose Celano) 96f1359 docs: update EPIC #1669 tables reflecting peer-id extraction (Jose Celano) 091e0ba docs: mark issue #1884 as implemented, update acceptance criteria (Jose Celano) 2d63158 refactor: migrate peer-id to published torrust-peer-id 0.1.0 (Jose Celano) d48ad9a docs(tracker-core): update issue #1884 spec with license decision (Jose Celano) Pull request description: Migrate the `bittorrent-peer-id` path dependency to the published `torrust-peer-id` 0.1.0 crate. ## Summary - Replaced `bittorrent-peer-id` path deps in `http-protocol`, `primitives`, and `udp-protocol` with `torrust-peer-id = "0.1.0"` from crates.io - Renamed all Rust `use bittorrent_peer_id` statements to `use torrust_peer_id` - Removed `packages/primitives/src/peer_id.rs` thin re-export module; `lib.rs` now directly re-exports from `torrust_peer_id` - Deleted the entire `packages/peer-id/` directory - Updated `AGENTS.md` package catalog - Updated issue spec #1884 and EPIC #1669 tables ## Why The `torrust-peer-id` crate was extracted to `torrust/torrust-bittorrent`, published under Apache-2.0 (matching the upstream `aquatic_peer_id` license). It has zero workspace dependencies and was the first in the `bittorrent-*` extraction sequence (EPIC #1669). ## Verification - [x] `cargo check --workspace` — pass - [x] `cargo test --tests --workspace --all-targets --all-features` — pass - [x] `cargo test --doc --workspace` — pass - [x] `linter all` — pass - [x] `cargo machete --with-metadata` — pass - [x] Pre-push hook (format, check, doc, test) — pass Closes #1884 ACKs for top commit: josecelano: ACK f0f651f Tree-SHA512: e479c4bbee166246d3f061b409fb1b244a5ac32521f8cbb2038b96a5daa973076a20badf9033419cafaf49d6ebba8d473b9c90dea52d933c71f830f1fe9162d2
2 parents 78e0c00 + f0f651f commit 988678b

21 files changed

Lines changed: 110 additions & 1320 deletions

File tree

AGENTS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ All packages live under `packages/`. The workspace version is `3.0.0-develop`.
7272
| `http-tracker-core` | `torrust-tracker-http-tracker-core` | `*-core` | HTTP-specific tracker domain logic |
7373
| `located-error` | `torrust-located-error` | utilities | Diagnostic errors with source locations |
7474
| `metrics` | `torrust-metrics` | domain | Prometheus metrics integration |
75-
| `peer-id` | `bittorrent-peer-id` | domain | Peer ID parsing and formatting utilities |
7675
| `primitives` | `torrust-tracker-primitives` | domain | Core domain types (InfoHash, PeerId, ...) |
7776
| `rest-api-client` | `torrust-tracker-rest-api-client` | client tools | REST API client library |
7877
| `rest-api-core` | `torrust-tracker-rest-api-core` | client tools | REST API core logic |

Cargo.lock

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

Containerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ COPY packages/http-tracker-core/Cargo.toml packages/http-tracker-core/
7878
COPY packages/located-error/Cargo.toml packages/located-error/
7979
COPY packages/metrics/Cargo.toml packages/metrics/
8080
COPY packages/net-primitives/Cargo.toml packages/net-primitives/
81-
COPY packages/peer-id/Cargo.toml packages/peer-id/
8281
COPY packages/primitives/Cargo.toml packages/primitives/
8382
COPY packages/rest-api-client/Cargo.toml packages/rest-api-client/
8483
COPY packages/rest-api-core/Cargo.toml packages/rest-api-core/
@@ -127,7 +126,6 @@ RUN mkdir -p \
127126
packages/located-error/src \
128127
packages/metrics/src \
129128
packages/net-primitives/src \
130-
packages/peer-id/src \
131129
packages/primitives/src \
132130
packages/rest-api-client/src \
133131
packages/rest-api-core/src \
@@ -170,7 +168,6 @@ RUN mkdir -p \
170168
packages/located-error/src/lib.rs \
171169
packages/metrics/src/lib.rs \
172170
packages/net-primitives/src/lib.rs \
173-
packages/peer-id/src/lib.rs \
174171
packages/primitives/src/lib.rs \
175172
packages/rest-api-client/src/lib.rs \
176173
packages/rest-api-core/src/lib.rs \

docs/issues/open/1669-overhaul-packages/EPIC.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,6 @@ The workspace currently contains **27 packages** (including the root `torrust-tr
9494
| No | `torrust-tracker-udp-tracker-protocol` | `udp-protocol` |
9595
| No | `torrust-tracker-udp-server` | `udp-server` |
9696

97-
### `bittorrent-` prefix
98-
99-
| Published on crates.io | Crate Name | Folder |
100-
| ---------------------- | -------------------- | --------- |
101-
| No | `bittorrent-peer-id` | `peer-id` |
102-
10397
**Observation**: only 6 of 27 packages are currently published on crates.io, all of which
10498
carry the `torrust-tracker-` prefix. Every `bittorrent-` and `torrust-axum-` crate is
10599
unpublished. This confirms issue #1659's note that "many new crates have not been published
@@ -233,7 +227,7 @@ Notes:
233227
1. Will be replaced by the newer `contrib/bencode` code from tracker.
234228
2. May be inlined into consumers rather than published independently.
235229
3. Migrates newer tracker implementation and replaces old `packages/bencode`.
236-
4. No workspace deps; first in the `bittorrent-*` extraction sequence.
230+
4. **Completed June 2026**: `torrust-peer-id 0.1.0` published to crates.io from `torrust/torrust-bittorrent`. Tracker consumers migrated; `packages/peer-id` removed from tracker workspace.
237231
5. Migrate `InfoHash` here; then archive `torrust/bittorrent-primitives`.
238232

239233
The following crates remain in `torrust/torrust-tracker` for now:
@@ -542,7 +536,7 @@ Status: TODO unless noted.
542536
- [x] [#1834](https://github.com/torrust/torrust-tracker/issues/1834) SI-13: Decouple `http-protocol` from `udp-protocol` _(Rule M; remove cross-protocol dependency edge)_
543537
- [x] [#1835](https://github.com/torrust/torrust-tracker/issues/1835) SI-14: Decouple `http-protocol` from `torrust-tracker-primitives` _(Rule M; remove protocol -> domain coupling as step 2)_
544538
- [ ] [#1882](https://github.com/torrust/torrust-tracker/issues/1882) SI-18: Extract `torrust-metrics` to standalone repository _(Rule E; requires completed metrics rename work)_
545-
- [ ] [#1884](https://github.com/torrust/torrust-tracker/issues/1884) SI-19: Move `bittorrent-peer-id` to `torrust/torrust-bittorrent` as `torrust-peer-id` _(Rule E; no workspace deps; first `bittorrent-*` extraction)_
539+
- [x] [#1884](https://github.com/torrust/torrust-tracker/issues/1884) SI-19: Move `bittorrent-peer-id` to `torrust/torrust-bittorrent` as `torrust-peer-id` _(Rule E; no workspace deps; first `bittorrent-*` extraction)_
546540
- [ ] [#1885](https://github.com/torrust/torrust-tracker/issues/1885) SI-20: Extract `torrust-net-primitives` to standalone repository _(Rule E; no workspace deps; no prerequisites)_
547541

548542
#### 4. Other Tracked Items (Drafts and Promoted Issues)
@@ -574,7 +568,7 @@ Details:
574568
| Located error rename | [#1823](https://github.com/torrust/torrust-tracker/issues/1823) — Rename `torrust-tracker-located-error` to `torrust-located-error` | [docs/issues/closed/1823-1669-10-rename-torrust-tracker-located-error-to-torrust-located-error.md](../../closed/1823-1669-10-rename-torrust-tracker-located-error-to-torrust-located-error.md) | DONE | Rule P; completed |
575569
| README refresh | #TBD — Update all package READMEs | [docs/issues/drafts/1669-update-all-package-readmes.md](../../drafts/1669-update-all-package-readmes.md) | TODO | Documentation; requires completed rename work; before extraction work |
576570
| Bencode migration | [#1881](https://github.com/torrust/torrust-tracker/issues/1881) SI-16: Migrate `contrib/bencode` to `torrust/torrust-bittorrent` as `torrust-bencode` | [docs/issues/closed/1881-1669-16-migrate-contrib-bencode-to-torrust-bittorrent/ISSUE.md](../../closed/1881-1669-16-migrate-contrib-bencode-to-torrust-bittorrent/ISSUE.md) | DONE | Rule E; torrust-bencode 3.0.0 published; contrib/bencode removed from tracker workspace |
577-
| Peer-ID move | [#1884](https://github.com/torrust/torrust-tracker/issues/1884) — Move `bittorrent-peer-id` to `torrust/torrust-bittorrent` as `torrust-peer-id` | [docs/issues/open/1884-1669-19-move-bittorrent-peer-id-to-torrust-bittorrent.md](../../open/1884-1669-19-move-bittorrent-peer-id-to-torrust-bittorrent.md) | TODO | Rule E; no workspace deps in crate; 3 consumers to migrate; first `bittorrent-*` extraction sequence item |
571+
| Peer-ID move | [#1884](https://github.com/torrust/torrust-tracker/issues/1884) — Move `bittorrent-peer-id` to `torrust/torrust-bittorrent` as `torrust-peer-id` | [docs/issues/open/1884-1669-19-move-bittorrent-peer-id-to-torrust-bittorrent.md](../../open/1884-1669-19-move-bittorrent-peer-id-to-torrust-bittorrent.md) | DONE | Rule E; published as torrust-peer-id 0.1.0 on crates.io; 3 tracker consumers migrated; packages/peer-id removed |
578572
| Clock extraction | [#1879](https://github.com/torrust/torrust-tracker/issues/1879) — Extract `torrust-clock` to standalone repository | [docs/issues/closed/1879-1669-17-extract-torrust-clock-to-standalone-repo.md](../../closed/1879-1669-17-extract-torrust-clock-to-standalone-repo.md) | DONE | Rule E; torrust-clock v3.0.0 published; 13 consumers migrated; packages/clock removed |
579573
| Metrics extraction | [#1882](https://github.com/torrust/torrust-tracker/issues/1882) — Extract `torrust-metrics` to standalone repository | [docs/issues/open/1882-1669-18-extract-torrust-metrics-to-standalone-repo.md](../../open/1882-1669-18-extract-torrust-metrics-to-standalone-repo.md) | TODO | Rule E; requires completed metrics rename; 7 workspace consumers to migrate |
580574
| Net-primitives extraction | [#1885](https://github.com/torrust/torrust-tracker/issues/1885) — Extract `torrust-net-primitives` to standalone repository | [docs/issues/open/1885-1669-20-extract-torrust-net-primitives-to-standalone-repo.md](../../open/1885-1669-20-extract-torrust-net-primitives-to-standalone-repo.md) | TODO | Rule E; no workspace deps; no prerequisites; 10 consumers to migrate; new repo torrust/torrust-net-primitives |

0 commit comments

Comments
 (0)