Closed dimitrilw closed 6 months ago
Hey! Sorry, I should drop a note in the README until the next Mojo release comes out. There are a few features that rely on changes currently in the nightly/mojo version, namely the Tuple unpacking update. We should probably see a new Mojo release which includes these features within a week or so I would think. After this release, the library will go back to being in sync with the latest Mojo release.
If you want to try this out now, please install the nightly mojo build with modular install nightly/mojo
.
Ty!
Some day we'll have an improved packaging system with pinned versions (including mojo version) that makes all this a lot easier. The bleeding edge is bloody after all. 😄
I can't wait for a proper packaging system, it's definitely a challenge for the time being. It's like coding in hard mode just trying to build something while fighting against the compiler, the language, and the packaging haha
^this. 100% this.
Perhaps you could add a badge to the top of the readme. Something like:
Oh nice, that's pretty cool! I'll add that, thank you
I should have included easy-to-copy line:
![Mojo Nightly 24.x](https://img.shields.io/badge/Mojo%F0%9F%94%A5-Nightly_24.x-purple)
Sorry for comment spam -- I should slow down and thing before pressing enter; I'm using this issue like a rapid-fire chat channel.
Note that the sample has the version inside the alt-text ([Mojo Nightly 24.x]
) and also in the badge's URL. You'll want to update both as needed.
No worries, I appreciate it! Were you able to build the package while using nightly mojo?
I haven't tried yet. Most of my keyboard time the last couple days has been on client work. And most of my Mojo time was "crazed imaginary coding while I took a few walks to break up the client work hours." 😂
I'm installing nightly/mojo right now. But not finding the right documentation on it -- do you know if you can easily toggle between nightly & stable? I'm not aware of any "nvm" like system in Mojo (yet) or version pinning or anything. After I install, am I basically doing everything in nightly when I mojo blahblah.mojo
and mojo package blahblah.mojo -o blahblah.📦
etc...?
Thank you for letting me abuse you as a source of knowledge. 😊
Ah, think I got my answer. The launcher is just determined by PATH search order, so I did this as a lazy quick-n-manual toggle in my ~/.zshrc. In the future, I might add an alias that lets me hot-swap my PATH settings. I've done that before in the early days of "how many versions of Python/JS/whatever do I need to keep installed??" But it gets messy. For now, this works.
# mojo versions: stable & nightly
export MOJO_STABLE_PATH="/Users/dimitri/.modular/pkg/packages.modular.com_mojo/bin"
export MOJO_NIGHTLY_PATH="/Users/dimitri/.modular/pkg/packages.modular.com_nightly_mojo/bin"
# mojo version in use
export PATH="$MOJO_NIGHTLY_PATH:$PATH"
Looks like it worked. I haven't tried importing and using the package, but it did run the command and generate the output file. I'll mark this issue closed. Ty!
There's some documentation on using nightly in the mojo GitHub repository but it's pretty sparse like you've said. I usually just update my PATH variables to swap between the two. Not very elegant, but it works
I am using Mojo version
mojo 24.2.1 (2f0dcf11)
.I cloned the mog repository and cd'd to the root of the repo. Then, I ran
mojo package mog/ -o mog.📦
, resulting in this error output: