M
Modularā€¢15mo ago
Arctic

Plans for a package manager?

Are there any plans to implement a package manager for mojo like pip/pypi, nuget, npm, etc?
23 Replies
davidfekke
davidfekkeā€¢15mo ago
I think it would be better to have a decentralized system like the way Apple has with the SPM. There is a public index, but the packages themselves are hosted individually, like in a Github repo.
Mahmoud Abduljawad
Mahmoud Abduljawadā€¢15mo ago
One thing to take into consideration for Mojo package manager when it happens is supply-chain attacks which were used recently in PyPI.
drunkwcodes
drunkwcodesā€¢15mo ago
I'm working on this. Please have a look at https://github.com/mojopaa/mojo_muse If you are interested in development, please contact me: [email protected]
GitHub
GitHub - mojopaa/mojo_muse: Mojo users will use.
Mojo users will use. Contribute to mojopaa/mojo_muse development by creating an account on GitHub.
AkaHenry
AkaHenryā€¢13mo ago
@Chris Lattner hi, Chris. Since the release of Mojo v.0.6, which is pretty awesome. Are there any plans to design a Mojo package management tool? (like rust cargo ) Personally, I think the community is in dire need of package management tools at the moment. https://discord.com/channels/1087530497313357884/1181760882020204616 Another similar question @Jack Clayton
Pierre Augier
Pierre Augierā€¢13mo ago
Note that in the Python world, we have also pdm, pixi, etc. Pixi is written in Rust with a nice Rust library for dependency resolution.
Chris Lattner
Chris Lattnerā€¢13mo ago
Hi @AkaHenry we don't have concrete plans right now, but it's a clear need, and I'm sure it's importance will only escalate over time. We'll figure it out at some point and share a proposal whenever it starts to bake
AkaHenry
AkaHenryā€¢13mo ago
Thanks for your reply. Looking forward to the arrival of package management tools. šŸ˜„
andre1sk
andre1skā€¢13mo ago
Is there some interim solution people are using?
mad alex 1997
mad alex 1997ā€¢13mo ago
Make a github repo and share the link in projects. Not ideal but there is no point in half measures when the language is still so new.
ksandvik
ksandvikā€¢13mo ago
I think delegation to github depot URL links and possibly even import in the code itself using the url is the way to go, but just my opinion. Others could still write web sited with recommended pages et rest.
AkaHenry
AkaHenryā€¢12mo ago
No description
AkaHenry
AkaHenryā€¢12mo ago
a hack usage: - Put the compiled xxx.mojopkg into the mojo standard library path to get vscode's smart completion hints. šŸ˜„
# mojo std lib dir:

/home/vscode/.modular/pkg/packages.modular.com_mojo/lib/mojo
# mojo std lib dir:

/home/vscode/.modular/pkg/packages.modular.com_mojo/lib/mojo
ModularBot
ModularBotā€¢12mo ago
akahenry has been warned
Reason: Bad word usage
AkaHenry
AkaHenryā€¢12mo ago
I'm writing a temporary mojo package management tool: mod (= mojo dep).
https://pypi.org/project/mod-cli/ - WIP. The implementation idea is similar to go vendor ( go early package management solution).
Here are some common commands:
1. mod init:
a. create a temporary directory called vendor/target/deps in project. (in a .gitignore file) b. create a configuration file mod.toml (similar to rust cargo.toml)
2. mod add xxx: git clone package's source codes into the vendor/ directory,
3. mod hack package xxx: build the xxx package into xxx.mojopkg, and copy it to the .modular/pkg/packages.modular.com_mojo/lib/mojo'directory. This way vscode can autocomplete it. (a hack usage)
4. mod hack remove xxx, remove xxx from .modular/pkg/packages.modular.com_mojo/lib/mojo. 5. Other commonly used commands (new, update, sync, ...)
Here's a requirement, @Chris Lattner can you temporarily support a feature: create an x directory in .modular/pkg/packages.modular.com_mojo/lib/mojo, and support searching for mojopkg in this directory, so as to avoid confusion with the mojo standard library. (x is also the directory name of the Go early storage plugin libs).
ModularBot
ModularBotā€¢12mo ago
akahenry has been warned
Reason: Bad word usage
ModularBot
ModularBotā€¢12mo ago
akahenry has been warned
Reason: Bad word usage
AkaHenry
AkaHenryā€¢12mo ago
@here
ModularBot
ModularBotā€¢12mo ago
akahenry has been warned
Reason: Bad word usage
AkaHenry
AkaHenryā€¢12mo ago
Mod = Mojo Dep. a Mojo Package Manager. (WIP) https://github.com/better-mojo/mod https://pypi.org/project/mod-cli/
GitHub
GitHub - better-mojo/mod: Mod = Mojo Dep. a Mojo Package Manager.
Mod = Mojo Dep. a Mojo Package Manager. Contribute to better-mojo/mod development by creating an account on GitHub.
PyPI
mod-cli
a CLI Tool for Mojo Package Manager
AkaHenry
AkaHenryā€¢12mo ago
No description
AkaHenry
AkaHenryā€¢12mo ago
No description
AkaHenry
AkaHenryā€¢12mo ago
@here hi, all. I have written a package management tool called Mod for Mojo (WIP). The mod new command has been implemented so far. Other commands are still under development. Feel free to join in the development if you're interested. šŸ˜„ https://github.com/better-mojo/mod https://pypi.org/project/mod-cli/
GitHub
GitHub - better-mojo/mod: Mod = Mojo Dep. a Mojo Package Manager.
Mod = Mojo Dep. a Mojo Package Manager. Contribute to better-mojo/mod development by creating an account on GitHub.
PyPI
mod-cli
a CLI Tool for Mojo Package Manager
Moosems / Three chickens
And then share the .mojopkg.
Want results from more Discord servers?
Add your server