{ "comment": "What the Mojo corpus is built from. Edit this to move to a new Mojo version, then run `python3 scripts/mojo/corpus.py harvest` and `verify`. See docs/mojo-corpus.md.", "mojo": { "version": "1.1.0" }, "godbolt": { "base": "https://godbolt.org", "compiler": "mojo_1_1_0", "concurrency": 2, "timeoutSeconds": 90 }, "sources": { "modular": { "repo": "modular/modular", "ref": "mojo/v1.1.0", "note": "The compiler, stdlib, manual, release notes, and compiler tests. Mojo releases are tagged mojo/vX.Y.Z in this repository (the platform's own tags are modular/vX.Y). Only the stdlib and the release notes are required to be present; a processor whose inputs are missing at a ref (the compiler sources, say) is skipped with a warning and keeps its previous output.", "markers": ["stdlib/std/prelude/__init__.mojo", "docs/site/releases"], "license": "Apache-2.0 WITH LLVM-exception (per file headers; confirm the docs carry the same licence)" }, "mojo-quest": { "repo": "modular/mojo-quest", "repoConfirmed": false, "ref": "3576e6105381bb6f956f405408ea8202ddf1eb6e", "note": "Mojo Quest pins mojo_1_1_0 itself (src/lib/compile.ts), so its main branch at a commit where that is still true is the right ref. The repository name is inferred: the zip carries no remote URL.", "markers": ["src/data/issues.ts", "exercises"], "license": "Apache-2.0 WITH LLVM-exception per file headers; the repo has no LICENSE file, so confirm with Modular before showing exercises to students" }, "mojo-syntax": { "repo": "modular/mojo-syntax", "ref": "48cdeac4f6b542e0b50666a5725fdfadf6188836", "markers": ["syntaxes/mojo.syntax.json", "tests"], "license": "MIT" }, "vscode-mojo": { "repo": "modular/vscode-mojo", "ref": "e60719a9fed899466072fef4b499041f9c4247ad", "markers": ["language-configuration.json", "package.json", "extension"], "license": "Apache-2.0" }, "skills": { "repo": "modular/skills", "ref": "0288f88deff5e4d936ed1b84db125f2b9bafc0d1", "note": "The skill targets the latest Mojo, which can be ahead of the pin; its table is a list of candidates, not a ruling.", "markers": ["mojo-syntax/SKILL.md"], "license": "Apache-2.0 WITH LLVM-exception" } }, "dialect": { "comment": "Cheap first look at whether a program fits the pin. `newer`: arrived after the pinned version (from the snapshot's nightly changelog). `older`: the pinned version rejects it (from the release notes or the pinned TokenKinds.def). Only verify decides; these only set expectations. Review both lists on every version bump.", "newer": [ { "id": "match", "pattern": "^\\s*(?:comptime\\s+)?__match\\b", "why": "experimental __match/case pattern matching, nightly after 1.1.0" }, { "id": "not-trait", "pattern": "^\\s*struct\\s+\\w+[^\\n]*\\([^)\\n]*\\bnot\\s+[A-Z]\\w*", "why": "opting a struct out of a trait with `not `, nightly after 1.1.0" }, { "id": "async-rename", "pattern": "\\b__(?:async|await)\\b", "why": "async/await renamed __async/__await, nightly after 1.1.0" }, { "id": "mut-string-span", "pattern": "\\bMutStringSpan\\b", "why": "MutStringSpan, nightly after 1.1.0" }, { "id": "hash-bytes", "pattern": "\\bhash_bytes\\s*\\(", "why": "hash_bytes(), nightly after 1.1.0" }, { "id": "tuple-first-of", "pattern": "\\.first_of\\[", "why": "Tuple.first_of[T](), nightly after 1.1.0" }, { "id": "target-accelerator", "pattern": "\\bTargetAccelerator\\b", "why": "TargetAccelerator, nightly after 1.1.0" } ], "older": [ { "id": "fn", "pattern": "^\\s*fn\\s+\\w", "why": "`fn` removed in 1.1.0 (release notes, Removed); use def" }, { "id": "alias", "pattern": "^\\s*alias\\s+\\w+\\s*[\\[=]", "why": "`alias` removed in 1.1.0 (release notes, Removed); use comptime" }, { "id": "parameter-if-for", "pattern": "@parameter\\s*\\n\\s*(?:if|for)\\b", "why": "@parameter if/for removed in 1.1.0; use comptime if/for" }, { "id": "comptime-assert-legacy", "pattern": "\\b__comptime_assert\\b", "why": "__comptime_assert removed in 1.1.0; use comptime assert" }, { "id": "read-convention", "pattern": "[(,]\\s*read\\s+\\w+\\s*:|\\bread\\s+self\\b", "why": "the read convention is a hard error in 1.1.0; use imm (or nothing)" }, { "id": "owned-convention", "pattern": "[(,]\\s*owned\\s+\\w+\\s*:|\\bowned\\s+self\\b", "why": "`owned` removed in 0.26.2; use var (or deinit)" }, { "id": "inline-array", "pattern": "\\bInlineArray\\b", "why": "the InlineArray alias removed in 1.1.0; use Array" }, { "id": "unsafe-pointer-aliases", "pattern": "\\b(?:MutUnsafePointer|ImmUnsafePointer|ImmutUnsafePointer|ImmutOpaquePointer|ImmutPointer|OptionalUnsafePointer)\\b", "why": "pre-unification pointer aliases removed in 1.1.0" }, { "id": "let", "pattern": "^\\s*let\\s+\\w+\\s*[:=]", "why": "not a keyword in 1.1's TokenKinds.def; use var" }, { "id": "inout", "pattern": "[(,]\\s*inout\\s+\\w+\\s*:|\\binout\\s+self\\b", "why": "not a convention in 1.1's parser; use mut" } ] } }