Dependency management/packaging workflow redesign: out of scope or not? #117
-
There's been a ton of discussion concerning packaging and dependency management in Python over the past few years (see e.g. here as a starting point with additional links). The consensus seems to be that pieceing together a workflow based on official tools (pip, venv) is relatively complicated for a newcomer, so a variety of alternatives have sprung up (Poetry, Hatch, PDM...), which are however baked to various degrees of finished and don't always address all of the same use cases, so the end result is fragmentation and even more confusion for users. At the same time, Python's relatively long history at this point makes it hard to start from scratch in this area. I'd be curious to know if the dev team sees Mojo as an opportunity to improve on this front too and design a modern dependency management and packaging tool that should ship with Mojo 1.0 (the way Rust 1.0 didn't ship until Cargo/crates.io was relatively polished)? Or whether this is an area which they consider out of scope. (I understand this might be unwanted for a variety of reasons, not the least of which is that it introduces even more fragmentation, especially in the short term. And if Mojo-based libs will be able to compile for use from regular CPython, packaged as wheels -- in other words, if there's no technical need for a separate package index for Mojo-based libs -- that would be a strong argument against a split.) |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 3 replies
-
I see the roadmap mentions "Improved package management support." -- although that can presumably just mean bringing it on par with what Python has today? |
Beta Was this translation helpful? Give feedback.
-
One of the biggest improvements we're planning for Mojo is to eliminate the need to write code in C to get performance. :). That will help one common source of packaging problems - dealing with the C parts of the packages. |
Beta Was this translation helpful? Give feedback.
-
I agree, having an elegant and extensive package manager or project tool (which cargo really is and handles packaging/dependencies as one feature) would be a big selling point for Mojo even if its not a language construct. As long as this tool could be extended by developers (i.e in cargo yo could write extension tools that are installed inside .carg/bin/ that cargo the tool could call). |
Beta Was this translation helpful? Give feedback.
-
Do you plan to implement tooling like package managers, IDE tools, formatters yourselves and ship it with Mojo? |
Beta Was this translation helpful? Give feedback.
-
I took a look at poetry https://python-poetry.org which is a 'cargo clone' for Python tooling/dependencies at rest and it's actually pretty neat, will start using it here for my own projects to test it out. Depending on the direction of tooling this could be an option as then mojo code will interact the same way as python modules for maximal re-use of both language packages. Parts of the config settings are uniform (such as general meta data), some somewhat specific, like selecting a specific mojo compiler rather than python version, and some might need more work like using a mojo specific package index rather than pypi.org . Anyway, even that is doable in poetry as you could write custom plugins. Note poetry, like cargo, also handles starting up default projects (i.e. cargo init, poetry init, cargo run, poetry run). Poetry relies on venv, not sure if mojo will use that s name approach to isolate packages or just take care of dependencies and build binaries, but venv could store the dependency packages anyway. So going back to the bigger picture, should mojo co-exist with python tooling or start its own tooling world, or have both... |
Beta Was this translation helpful? Give feedback.
-
I read various reddit postings about package managers last night and:
I'm sure I missed something but that's the little I found out last night. |
Beta Was this translation helpful? Give feedback.
-
We definitely hear the feedback on package management but we have a lot going on already - so we'll consider as time goes on. We'll close this for now. |
Beta Was this translation helpful? Give feedback.
We definitely hear the feedback on package management but we have a lot going on already - so we'll consider as time goes on.
We'll close this for now.