-
Notifications
You must be signed in to change notification settings - Fork 13
feat: mojo build backend #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e88426d
to
76a36d1
Compare
Related test project: https://github.com/sstadick/pixi-build-mojo-test @baszalmstra It's so close to working. When I try to build that test project with I have no idea why. I can see the installed package in the |
Also note, this is kind of doing two things at once, it does build a conda package, but it's also dropping a binary or mojopkg in a |
Specifically it seems like my dependencies other than the compiler don't get copied into the I did also confirm the same issue with another mojopkg |
When I check the recipe that is generated with your example and backend these are the dependencies that are installed: requirements:
build:
- max
host:
- max
- extramojo So I would indeed assume that @Hofer-Julian Would you happen to know what a proper mojo recipe should look like? I couldnt find an example. |
That was enough of a hint! Failure in reading on my part, I thought Making extramojo a |
Todo:
|
You should not need to copy the artifact out. It should be installable now. You can create an environment in your test example and simply add a dependency on the package with: [dependencies]
greetings = { path = "." } If all goes well, the binary should then be installed in the environment and be executable! what do you mean with:
|
Thanks @baszalmstra!
Regarding git refs - I'd like to be able to depend on packages like extramojo via Thanks for your help on this, this is coming together way faster than I thought it would! |
And yes pixi supports git refs in all dependency sections, host and build included. You will have to rebase on |
cabc530
to
531a5d4
Compare
I believe this is ready for review. Working example project for it: https://github.com/sstadick/pixi-build-mojo-test |
@baszalmstra I think I've addressed your initial comments and it's ready for a second look! |
This work looks fantastic, many thanks for putting it together! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment but this look great IMO!
Thanks @baszalmstra! Comments addressed I think 👍 |
bbaaad0
to
72ff2ad
Compare
@baszalmstra - updated! I think that should fix CI. |
CI is running - let's see! :) |
A few typos and lints 😱 |
@wolfv strong chance I got it all fixed! All the lefthook checks are passing now. Running some of those pixi tasks must have installed it automatically for me, because it wasn't running before for commits or pushes, but now it is 🤷 |
Very well done @sstadick ! Thank you! |
Thanks for all your help on this @baszalmstra ! |
This PR adds a
pixi-build-mojo
backend.See https://github.com/sstadick/pixi-build-mojo-test as an example project.
It follows the patterns in the other backend impls, for the most part. It adds two more layers to the
package.build.configuration
with abins
key, which configures an output binary, and apkg
key, which configures an output.mojopkg
output.Since pixi is the recommended build tool for Mojo, this will hopefully make pixi a bit more ergonomic and beginner friendly for creating and using Mojo packages. Any suggestions for improving ergonomics in this vein are very welcome!
I'd recommend starting with the added docs section.