Repository navigation
chore: bump Motoko to v2.2.2 - #458
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
Motoko examples fail to compile, the sidebar references a deleted page, and the migration link and toolchain pin remain incorrect.
4 open issues
What changed in this PR
This PR updates the ICP developer documentation for Motoko v2.2.2, bringing the synced language reference and examples in line with the v2 release series.
Changes:
- Updates the recorded Motoko version and imports release notes through v2.2.2.
- Refreshes examples and reference material for persistent-by-default actors, revised syntax, and stricter type checking.
- Adds a v1-to-v2 migration guide and removes documentation for retired features.
Verified
Checked local documentation consistency, link resolution, and committed navigation. Builds and compiler checks were not run.
| File | Description |
|---|---|
docs/languages/motoko/reference/style-guide.md |
Updates syntax and formatting guidance. |
docs/languages/motoko/reference/language-manual.md |
Documents revised language semantics. |
docs/languages/motoko/reference/error-codes.md |
Clarifies async and variant diagnostics. |
docs/languages/motoko/reference/compiler-ref.md |
Updates compiler usage and supported flags. |
docs/languages/motoko/reference/changelog.md |
Adds release notes through v2.2.2. |
docs/languages/motoko/moc-v2-migration.md |
Adds the v1-to-v2 migration guide. |
docs/languages/motoko/index.md |
Updates persistence introduction and migration links. |
docs/languages/motoko/icp-features/view-queries.md |
Removes retired generated-query documentation. |
docs/languages/motoko/icp-features/system-functions.md |
Updates examples and upgrade-hook deprecations. |
docs/languages/motoko/icp-features/stable-memory.md |
Clarifies persistent heap and stable memory. |
docs/languages/motoko/icp-features/randomness.md |
Simplifies actor declarations. |
docs/languages/motoko/icp-features/candid-serialization.md |
Modernizes serialization example syntax. |
docs/languages/motoko/icp-features/caller-identification.md |
Simplifies the actor-class example. |
docs/languages/motoko/fundamentals/types/variants.md |
Updates variant-matching examples. |
docs/languages/motoko/fundamentals/types/type-conversions.md |
Updates actor and iteration 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 type terminology. |
docs/languages/motoko/fundamentals/types/results.md |
Modernizes result-handling examples. |
docs/languages/motoko/fundamentals/types/records.md |
Explains mutable-field copying in record updates. |
docs/languages/motoko/fundamentals/types/options.md |
Modernizes option-handling examples. |
docs/languages/motoko/fundamentals/types/objects-classes.md |
Updates conditional syntax. |
docs/languages/motoko/fundamentals/types/mutable-arrays.md |
Modernizes array examples. |
docs/languages/motoko/fundamentals/types/immutable-arrays.md |
Modernizes iteration and switch examples. |
docs/languages/motoko/fundamentals/types/function-types.md |
Updates actor and loop syntax. |
docs/languages/motoko/fundamentals/types/advanced-types.md |
Modernizes advanced-type examples. |
docs/languages/motoko/fundamentals/pattern-matching.md |
Updates patterns and exhaustiveness guidance. |
docs/languages/motoko/fundamentals/modules-imports.md |
Updates actor-class and loop examples. |
docs/languages/motoko/fundamentals/implicit-parameters.md |
Documents nested-module resolution. |
docs/languages/motoko/fundamentals/hello-world.md |
Introduces persistent-by-default actors. |
docs/languages/motoko/fundamentals/error-handling.md |
Updates the trap example’s syntax. |
docs/languages/motoko/fundamentals/declarations/module-declarations.md |
Modernizes module examples. |
docs/languages/motoko/fundamentals/declarations/function-declarations.md |
Updates the recursive-function example. |
docs/languages/motoko/fundamentals/declarations/class-declarations.md |
Simplifies actor declarations. |
docs/languages/motoko/fundamentals/control-flow/switch.md |
Updates switch syntax and exhaustiveness errors. |
docs/languages/motoko/fundamentals/control-flow/loops.md |
Modernizes loop syntax. |
docs/languages/motoko/fundamentals/control-flow/conditionals.md |
Updates conditionals and inferred-type errors. |
docs/languages/motoko/fundamentals/control-flow/blocks.md |
Updates conditional block examples. |
docs/languages/motoko/fundamentals/control-flow/basic-control-flow.md |
Modernizes control-flow examples. |
docs/languages/motoko/fundamentals/contextual-dot.md |
Updates resolution rules and default warnings. |
docs/languages/motoko/fundamentals/basic-syntax/whitespace.md |
Simplifies example actor declarations. |
docs/languages/motoko/fundamentals/basic-syntax/operators.md |
Updates conditional syntax. |
docs/languages/motoko/fundamentals/basic-syntax/functions.md |
Modernizes actor and function examples. |
docs/languages/motoko/fundamentals/basic-syntax/defining-an-actor.md |
Explains automatic actor persistence. |
docs/languages/motoko/fundamentals/basic-syntax/characters-text.md |
Modernizes text-processing examples. |
docs/languages/motoko/fundamentals/actors/orthogonal-persistence/overview.md |
Presents enhanced persistence as the sole 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 requirements and recovery guidance. |
docs/languages/motoko/fundamentals/actors/orthogonal-persistence/classical.md |
Removes classical-persistence documentation. |
docs/languages/motoko/fundamentals/actors/mixins.md |
Updates conditional syntax. |
docs/languages/motoko/fundamentals/actors/messaging.md |
Modernizes messaging examples. |
docs/languages/motoko/fundamentals/actors/enhanced-multi-migration.md |
Updates migration restrictions and compiler commands. |
docs/languages/motoko/fundamentals/actors/data-persistence.md |
Revises persistence defaults and migration guidance. |
docs/languages/motoko/fundamentals/actors/compatibility.md |
Clarifies migration field handling and compatibility. |
docs/languages/motoko/fundamentals/actors/actors-async.md |
Modernizes actor and async examples. |
docs/languages/motoko/base-core-migration.md |
Refreshes migration examples and removed-module listing. |
.sources/VERSIONS |
Records Motoko v2.2.2 and its commit hash. |
Review effort: Balanced
| @@ -87,9 +87,9 @@ Pattern matching supports literal patterns, which look like constant values (e.g | |||
|
|
|||
| ```motoko no-repl | |||
| switch ("Adrienne", #female) { | |||
| switch (person) { | ||
| case ({ name = fullName; age }) { fullName # " is " # Nat.toText(age) # " years old." }; | ||
| switch person { | ||
| case { name = fullName; age } { fullName # " is " # Nat.toText(age) # " years old." } |
|
|
||
| ```motoko | ||
| persistent actor Counter { | ||
| actor Counter { |
|
|
||
| ## 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.2.npm run sync:motoko— synced docs from the new releaseChecklist
Sync recommendation
sync from caffeinelabs/motoko doc/md