anacrolix / anacrolix/dht

Include these packages in `github.com/anacrolix/torrent` and/or split `metainfo` out of it ?

未关闭
#84 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
361
派生
69
平均合并
36 分钟
30 天内合并 PR
3

描述

Hello, I am considering packaging [qbittorrent-cli](https://github.com/ludviglundgren/qbittorrent-cli) in Debian, which depends on a few packages from `github.com/anacrolix/torrent`. In Debian, we package each libraries independently, so I would have to package `torrent`, and while checking a bit the dependency graph, it contains at least one cycle the `github.com/anacrolix/dht/v2` module depends on `github.com/anacrolix/torrent`, and vice-versa. This makes the packaging in Debian more complicated.

I would like to suggest two solutions for this, which are not exclusive:

1. Include `dht/v2` in `torrent`, this would be an easy way to brake the cycle. It makes sense to me as the `torrent` module already holds a lot of different packages.
2. Split out some basic parts from `torrent` in a new repo (e.g. `torrentutil`), mostly `metainfo` and its dependencies, to create a common module to import from both `torrent` and others like `dht/v2`, but also qbittorrent-cli. `torrent` would keep the features mostly related with a bittorrent client while the new module would have less dependencies and only provide useful types and parsers/encoders.

What do you think about this?

N.B. I did not fully investigate the dependency graph of `torrent` so there might be more cycles.

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start by mapping the dependency graph between github.com/anacrolix/dht/v2 and github.com/anacrolix/torrent, including metainfo and its dependencies. Compare the two proposed module arrangements with the needs of qbittorrent-cli; done means agreeing on a structure that removes the cycle and preserves the required library imports.

由索引模型根据 Issue 内容生成。

评估

技术栈
go
领域
distributed-systems
Issue 类型
重构
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。