hashberg-io / multiformats

Python implementation of multiformat protocols.
https://multiformats.readthedocs.io
MIT License
22 stars 6 forks source link

About the circular (install) dependency between multiformats and multiformats-config #24

Open declension opened 1 month ago

declension commented 1 month ago

First of all, thanks for the repo(s)!

I'm using Poetry, and that lead me to notice that multiformat depends on multiformat-config at least at build time, and also, multiformat-config depends on multiformat.

Clearly this isn't technically a problem in Python, but whilst I'm not an expert, it does seem that in Nix it causes trouble (an example with poetry2nix)

Is this a Nix problem, or is there anything that can be done here?

Thanks

sg495 commented 1 month ago

In this case, this seems to be an issue on the Nix side rather than the Python side. But really it is an issue with the current design of multiformats, which pre-initialises its data structures rather than initialising them on-demand. I will re-design the init process at some point in the near future, which will remove the need for multiformat-config altogether. Is this something that is causing you issues right now?

declension commented 1 month ago

Thanks @sg495 .

It's a non-critical issue I guess, as due the now-solved #10 we'd implemented the bits of the spec we needed manually in Python.

I recently tried pulling in this library again but given we package with Nix ran into this so have paused / halted that idea...

sg495 commented 1 month ago

No problem. I'll keep this open as a reminder to us of the issue, and I'll @ you when it's fixed.