Started to get a 404 when trying to build in GitHub Actions

Hi,

i have a little toy project in mojo and recently it has started to fail its builds in GitHub actions.
I already had a look with the maintainer of setup-mojo-action but we couldnt find out the reason for the failure. Maybe you could help me find out (and fix) what is wrong here?

Cheers

I recommend to use the official pixi setup action. Here is an example how it’s done in the gpu puzzles.

Ah, ok, i guess i am losing track of the recommended project setups.

So i would have to change out the action, switch the commands from

      - name: Build
        run: magic run mojo build main.πŸ”₯
      - name: Run
        run: ./main
      - name: Test
        run: magic run mojo test -I . test

to pixi commands and probably also change my mojoproject.toml and magic.lock somehow?

It is just a bit weird that my CI started breaking 2 weeks ago without any changes to the action, my workflow file or my code.

Got it to work now with pixi, but initially i also got

pixi run mojo build main.πŸ”₯
Error:   Γ— failed to solve the conda requirements of 'default' 'linux-64'
  ╰─▢ Cannot solve the request because of: No candidates were found for max >=24.5.0,<25.

Which i assume is also what caused the original error

magic run mojo build main.πŸ”₯
  Γ— failed to fetch mojo-jupyter-24.5.0-release.conda
  ╰─▢ HTTP status client error (404 Not Found) for url (https://
      repo.prefix.dev/max/noarch/mojo-jupyter-24.5.0-release.conda)


except that the message was unhelpful.

Also noticed that my code didnt compile anymore.

Reasons were missing .size on a List[int], using inout instead of mut (with an awful error message), input can raise (where can i find the types of errors that it actually can raise?)

Please see the official announcement about magic being deprecated. Note the the .lock file is auto-generated and can be removed. Then rename your mojoproject.toml to pixi.toml and use pixi cli commands instead of magic.

Thanks a lot!

Figured that out now and after fixing some compiler errors it is now working again.

So the main problems were just the awful error messages, both from magic for the non-existing max version (24.5 or something like that) and then also later with the new version the compiler error when using inout and also the lack of documentation for what errors builtins can raise (in my case input)