Repository navigation
chore: bump Motoko to v2.2.6 - #468
Open
pr-automation-bot-public[bot] wants to merge 1 commit into
Open
pr-automation-bot-public[bot] wants to merge 1 commit into
pr-automation-bot-public[bot] wants to merge 1 commit into
Conversation
|
🤖 Preview build failed. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A stale sidebar entry points to a deleted page, and the migration link, transient-field explanation, and pattern-matching example still need correction.
3 open issues
What changed in this PR
Updates the recorded Motoko version from v1.16.1 to v2.2.6 and refreshes the synced language documentation for ICP developers.
Changes:
- Adds release notes and a moc 1-to-2 migration guide.
- Updates examples and references for v2 syntax, type checking, and persistent-by-default actors.
- Revises upgrade guidance and removes pages for classical persistence and generated view queries.
Verification: Inspected source, navigation, link rewriting, and relevant language-reference rules. Builds and compiler checks were not run.
| File | Description |
|---|---|
docs/languages/motoko/reference/style-guide.md |
Updates recommended control-flow and pattern syntax. |
docs/languages/motoko/reference/language-manual.md |
Documents v2 language semantics and persistence rules. |
docs/languages/motoko/reference/error-codes.md |
Clarifies async-result and variant-pattern errors. |
docs/languages/motoko/reference/compiler-ref.md |
Updates compiler usage and removes obsolete flags. |
docs/languages/motoko/reference/changelog.md |
Adds release notes through v2.2.6. |
docs/languages/motoko/moc-v2-migration.md |
Adds the moc 1-to-2 migration guide. |
docs/languages/motoko/index.md |
Updates the overview and links to migration guidance. |
docs/languages/motoko/icp-features/view-queries.md |
Removes documentation for generated view queries. |
docs/languages/motoko/icp-features/system-functions.md |
Marks upgrade hooks deprecated and refreshes examples. |
docs/languages/motoko/icp-features/stable-memory.md |
Clarifies persistent heap versus stable memory. |
docs/languages/motoko/icp-features/randomness.md |
Removes redundant actor persistence keywords. |
docs/languages/motoko/icp-features/candid-serialization.md |
Updates actor, loop, and case syntax. |
docs/languages/motoko/icp-features/caller-identification.md |
Simplifies the actor-class declaration. |
docs/languages/motoko/fundamentals/types/variants.md |
Updates variant matching and iteration examples. |
docs/languages/motoko/fundamentals/types/type-conversions.md |
Refreshes actor and loop syntax. |
docs/languages/motoko/fundamentals/types/tuples.md |
Updates conditional syntax. |
docs/languages/motoko/fundamentals/types/subtyping.md |
Updates the control-flow example. |
docs/languages/motoko/fundamentals/types/stable-types.md |
Revises persistence defaults and async type terminology. |
docs/languages/motoko/fundamentals/types/results.md |
Updates result-handling syntax. |
docs/languages/motoko/fundamentals/types/records.md |
Explains copying mutable fields during record updates. |
docs/languages/motoko/fundamentals/types/options.md |
Refreshes option matching and conditional examples. |
docs/languages/motoko/fundamentals/types/objects-classes.md |
Updates conditional expressions and branches. |
docs/languages/motoko/fundamentals/types/mutable-arrays.md |
Refreshes actor, loop, and conditional syntax. |
docs/languages/motoko/fundamentals/types/immutable-arrays.md |
Updates iteration and chessboard examples. |
docs/languages/motoko/fundamentals/types/function-types.md |
Refreshes actor and loop examples. |
docs/languages/motoko/fundamentals/types/advanced-types.md |
Updates recursive-type and actor examples. |
docs/languages/motoko/fundamentals/pattern-matching.md |
Updates pattern syntax and exhaustiveness guidance. |
docs/languages/motoko/fundamentals/modules-imports.md |
Refreshes actor-class usage examples. |
docs/languages/motoko/fundamentals/implicit-parameters.md |
Documents nested-module resolution and updates examples. |
docs/languages/motoko/fundamentals/hello-world.md |
Introduces persistent-by-default actors. |
docs/languages/motoko/fundamentals/error-handling.md |
Updates the trap example's conditional syntax. |
docs/languages/motoko/fundamentals/declarations/module-declarations.md |
Refreshes module and actor examples. |
docs/languages/motoko/fundamentals/declarations/function-declarations.md |
Updates the recursive function example. |
docs/languages/motoko/fundamentals/declarations/class-declarations.md |
Simplifies actor-class declarations. |
docs/languages/motoko/fundamentals/control-flow/switch.md |
Updates case syntax and exhaustiveness errors. |
docs/languages/motoko/fundamentals/control-flow/loops.md |
Modernizes loop and branch examples. |
docs/languages/motoko/fundamentals/control-flow/conditionals.md |
Updates conditional syntax and inferred-type errors. |
docs/languages/motoko/fundamentals/control-flow/blocks.md |
Refreshes conditional block examples. |
docs/languages/motoko/fundamentals/control-flow/basic-control-flow.md |
Updates loops, branches, cases, and labeled blocks. |
docs/languages/motoko/fundamentals/contextual-dot.md |
Documents default warnings and nested-module lookup. |
docs/languages/motoko/fundamentals/basic-syntax/whitespace.md |
Simplifies actor declarations in spacing examples. |
docs/languages/motoko/fundamentals/basic-syntax/operators.md |
Updates logical-operator conditionals. |
docs/languages/motoko/fundamentals/basic-syntax/functions.md |
Refreshes actor and branch syntax. |
docs/languages/motoko/fundamentals/basic-syntax/defining-an-actor.md |
Explains automatic actor-state persistence. |
docs/languages/motoko/fundamentals/basic-syntax/characters-text.md |
Updates text-processing examples. |
docs/languages/motoko/fundamentals/actors/orthogonal-persistence/overview.md |
Presents enhanced persistence as the implementation. |
docs/languages/motoko/fundamentals/actors/orthogonal-persistence/index.md |
Removes the persistence-model comparison framing. |
docs/languages/motoko/fundamentals/actors/orthogonal-persistence/enhanced.md |
Updates migration safeguards and upgrade recovery guidance. |
docs/languages/motoko/fundamentals/actors/orthogonal-persistence/classical.md |
Removes the classical-persistence page. |
docs/languages/motoko/fundamentals/actors/mixins.md |
Updates the mixin example's conditional syntax. |
docs/languages/motoko/fundamentals/actors/messaging.md |
Refreshes messaging examples. |
docs/languages/motoko/fundamentals/actors/enhanced-multi-migration.md |
Simplifies commands and clarifies migration restrictions. |
docs/languages/motoko/fundamentals/actors/data-persistence.md |
Revises persistence defaults and upgrade-hook guidance. |
docs/languages/motoko/fundamentals/actors/compatibility.md |
Clarifies migration-field handling and upgrade checks. |
docs/languages/motoko/fundamentals/actors/actors-async.md |
Updates actor, conditional, and catch syntax. |
docs/languages/motoko/base-core-migration.md |
Refreshes migration examples and the removed-module list. |
.sources/VERSIONS |
Records Motoko v2.2.6 and its commit identifier. |
Review effort: Balanced
|
|
||
| You can only use the `stable`, `transient` (or legacy `flexible`) modifier on `let` and `var` declarations that are **actor fields**. You cannot use these modifiers anywhere else in your program. | ||
| * `stable` fields are persisted across upgrades. This is the default; you generally don't need to write it. | ||
| * `transient` fields are not. They are re-initialized on upgrade, unless they are transitively reachable from a persisted field. Use `transient` only for temporary state or references to higher-order types, such as local function references. |
| @@ -87,9 +87,9 @@ Pattern matching supports literal patterns, which look like constant values (e.g | |||
|
|
|||
| ```motoko no-repl | |||
| switch ("Adrienne", #female) { | |||
|
|
||
| ## 2.0.0 (2026-10-06) | ||
|
|
||
| * Upgrading from `moc` 1.x? The [moc v1 → v2 migration guide](doc/md/moc-v2-migration.md) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Automated bump of
.sources/motokofromv1.16.1tov2.2.6.npm run sync:motoko— synced docs from the new releaseChecklist
Sync recommendation
sync from caffeinelabs/motoko doc/md