Modular 26.6 is here

Modular 26.6 is here: Mojo 1.1 opens the compiler to external contributions and adds developer experience improvements, while MAX 26.6 brings audio generation, new model architectures, and faster performance. Read more here.

5 Likes

Congrats!

Just a heads-up…Mojo 1.1 appears to have some breaking changes in it, so at minimum you’ll probably want to change the upper limit for Mojo in your pixi.toml:

# Had this in my packages, some of them broke
# [dependencies]
# mojo = ">=1.0.0,<2"


[dependencies]
mojo = ">=1.0.0,<1.1" 

For the sake of my own understanding, could you please be more specific? what’s got broken after upgrade?

My sort dependent codes got broken because of this change:

    1. The async task API is private: std.runtime.asyncrt became std.runtime._asyncrt. The public std.runtime keeps only parallelism_level and initialize_runtime, and the docs say the async system “carries no stability guarantees” and is “deliberately not part of this package’s public API”.

    2. There is no public replacement. std.algorithm has map, vectorize, tile and unswitch; map is sequential (checked in the stdlib source, Mojo/stdlib/std/algorithm/backend/cpu/map.mojo). Nothing public in std runs a closure over work items on the thread pool.

    3. InlineArray is gone; Array is the name, on 1.0 too.

    4. A stat timespec’s sub-second field is tv_subsec on 1.0 and tv_nsec on 1.1.

      Move to Mojo 1.1 on the private task runtime (#472) by randyzwitch · Pull Request #475 · randyzwitch/canvas_mojo · GitHub

Sorry about the change in some of these interfaces, but there were good reasons for all of them. With 1.0, we had worked to stabilize the core of the language, but only a relatively small surface area of the Mojo standard library is currently marked as @stable. We are increasing this coverage over time, and will be doing so over the 1.x span. The library components marked as @stable can be built on with a high degree of confidence.

Given that much of what we think of as Mojo is defined at the library level, you can see changes impacting your code between point releases even though core language features themselves are stable. We’ll try to do our best to call those out in the changelog, and if we’re not communicating them as well as we could be, please let us know. Again, more of the standard library should be stabilizing as we progress through the 1.x series, but stability is a commitment and we need to carefully review each of these.

In your case, I want to highlight that the current async functionality in Mojo is not where we would like it to be and is a known area that will be fully revamped in the near term. That’s why we placed it behind the underscored interfaces you mention above: we wanted to convey that these interfaces may break, be reworked, or removed entirely in favor of something else. Anything with an underscore is something that is likely to change, so just know that going in when incorporating those into your projects. We unfortunately only caught these interfaces post-1.0, as part of our open-sourcing preparation, thus the migration you saw in 1.1.

2 Likes

No problem at all, I originally just wanted to point it out to everyone as the quick solution as they evaluated what the actual changes were :slight_smile:

1 Like