Will mojo let third parties handle the compiler distribution and packaging like python?

The cpython core team and steering council has the responsability of providing the source code but not to distribute it. It also doesn't have the responsability of defining how the packaging should be done. This is a huge issue as third parties must implement tools to do this and there are many different tools now. Let's take for the installation: - anaconda - the py installer on windows from the windows store - the installer from the python.org website - rye - deadsnakes - pre-installed python in ubuntu - ... Since there is no solution that is "blessed" by the core team, newcomers don't understand how to install Python. Python.org just provide the source code and no installer on linux for example (python beginners have to compile python themselves.😰 ) There is also no tool to change easily the version of python (anaconda does it but it doesn't work with Pypi). For the packaging of the code, many tools are available: - poetry - anaconda - pyproject.toml - setup.py - pip tools - pip - twine - ... Navigating among all those tools for non-experts is very hard. Let's be honest, it's hell for beginners who usually want one "blessed" solution that works well and satisfy 95% of use cases. For the extreme use cases, third party tools should be available. I know experienced (4y+) Python devs who are unable to make multiple packages depend on each other inside a monorepo because there is no clear standard. They are unable to change python versions without destroying their whole dev environment. Can Mojo take example on rust which seems to be the gold standard for distribution and packaging?
6 Replies
gryznar
gryznarβ€’12mo ago
+1 for this. I think there is high chance that Modular will take inspirations from Rust. Currently formatter is provided with SDK (as in Rust), so these inspirations should go step further and provide official utilities without 3rd party help πŸ˜‰ Rust solutions could be just simplified with preserving its capabilities Ideally, creating packages, uploading them could be implemented in modular package
gabrieldemarmiesse
gabrieldemarmiesseβ€’12mo ago
if we can throw in there being able to use multiple versions of the same lib in the same program I would be sooooo happy (I have horrible flashbacks about pydantic v1 -> v2 in a big project). rust does it so it should be possible in mojo too hopefully
gabrieldemarmiesse
gabrieldemarmiesseβ€’12mo ago
For Python devs wondering what is look likes in rust, it's quite trivial: https://stackoverflow.com/questions/58739075/how-do-i-import-multiple-versions-of-the-same-crate
Stack Overflow
How do I import multiple versions of the same crate?
As discussed in Is it documented that Cargo can download and bundle multiple versions of the same crate?, it's possible for Cargo to pull in multiple versions of the same crate for a single program...
Tuatini
Tuatiniβ€’11mo ago
I really hope they are going to take Rust's approach. Python package management is a real mess.
ModularBot
ModularBotβ€’11mo ago
Congrats @Tuatini, you just advanced to level 1!
geoqiao
geoqiaoβ€’11mo ago
+1 for this too. Python's package management rules and tools are really confusing. I don’t know rust how to solve this problem. But a simple and clear standard rules is very important.
Want results from more Discord servers?
Add your server