Background
The icskills submodule is currently pinned at 1d125a9; remote origin/main is at 4713d1e. That commit adds three new skills and substantially rewrites the existing motoko skill:
| Skill |
Change |
motoko |
Major overhaul: --default-persistent-actors is now the standard; dot notation (M0236) and implicit comparators (M0237) required; mixins added; moc 1.7.0 pinned |
migrating-motoko |
New: (with migration = ...) inline syntax for one-shot state migrations |
migrating-motoko-enhanced |
New: multi-step migration with a migrations/ directory and mops-managed --enhanced-migration flag |
mops-cli |
New: full toolchain coverage (check, build, test, lint, migrate, toolchain) |
Scope
This is a single PR that bumps the submodule from 1d125a9 to 4713d1e and updates the docs to match. The two must ship together: bumping without updating the docs would leave persistent actor in every code example while the pinned skill recommends plain actor {} with --default-persistent-actors.
Required changes
Bump icskills submodule
Add --default-persistent-actors and drop persistent actor from code examples
With the flag in mops.toml, plain actor { } works and all state is persistent by default. Keeping persistent actor in code examples while recommending the flag is contradictory.
[moc]
args = ["--default-persistent-actors", "-W=M0236,M0237,M0223"]
Files known to contain persistent actor in code blocks:
guides/backends/data-persistence.mdx
guides/backends/timers.mdx
guides/backends/certified-variables.md
guides/chain-fusion/bitcoin.mdx
guides/chain-fusion/ethereum.mdx
guides/chain-fusion/solana.mdx
guides/chain-fusion/exchange-rates.mdx
guides/canister-management/lifecycle.mdx
guides/canister-management/cycles-management.mdx
guides/security/canister-upgrades.md
guides/security/access-management.mdx
guides/canister-calls/inter-canister-calls.mdx
guides/canister-calls/parallel-inter-canister-calls.mdx
guides/digital-assets/ledgers.mdx
guides/authentication/internet-identity.mdx
references/application-canisters.md
Document (with migration = ...) inline migration syntax
The canister upgrade guides recommend avoiding preupgrade/postupgrade but say nothing about what to do when a field type changes or a field is renamed. That answer is now the inline migration syntax.
Update timer re-registration pattern
guides/backends/timers.mdx uses system func postupgrade to re-register timers. The new skill identifies timer IDs as the canonical transient var use case.
Document mops CLI commands in developer tools
references/developer-tools.md mentions mops but not its primary commands.
Out of scope
postupgrade in certified-variables.md and certification.md: legitimate use for re-establishing certifications after upgrade, not data migration
docs/languages/motoko/: auto-synced from caffeinelabs/motoko, not manually edited
Prerequisite
Wait for PR #208 to merge before starting. Several affected files are modified by that PR.
Background
The icskills submodule is currently pinned at
1d125a9; remoteorigin/mainis at4713d1e. That commit adds three new skills and substantially rewrites the existingmotokoskill:motoko--default-persistent-actorsis now the standard; dot notation (M0236) and implicit comparators (M0237) required; mixins added; moc 1.7.0 pinnedmigrating-motoko(with migration = ...)inline syntax for one-shot state migrationsmigrating-motoko-enhancedmigrations/directory and mops-managed--enhanced-migrationflagmops-cliScope
This is a single PR that bumps the submodule from
1d125a9to4713d1eand updates the docs to match. The two must ship together: bumping without updating the docs would leavepersistent actorin every code example while the pinned skill recommends plainactor {}with--default-persistent-actors.Required changes
Bump icskills submodule
.sources/icskillsto4713d1eAdd
--default-persistent-actorsand droppersistent actorfrom code examplesWith the flag in
mops.toml, plainactor { }works and all state is persistent by default. Keepingpersistent actorin code examples while recommending the flag is contradictory.--default-persistent-actorsto the recommendedmops.tomlsetup inguides/backends/data-persistence.mdx,concepts/orthogonal-persistence.md, andguides/canister-management/lifecycle.mdxpersistent actorwithactorin all Motoko code examples (approx. 50 occurrences in 30+ files — grep first to get the full list)persistent actoronly in explanatory prose where the keyword itself is being discussedFiles known to contain
persistent actorin code blocks:Document
(with migration = ...)inline migration syntaxThe canister upgrade guides recommend avoiding
preupgrade/postupgradebut say nothing about what to do when a field type changes or a field is renamed. That answer is now the inline migration syntax.guides/canister-management/lifecycle.mdxcovering(with migration = ...)guides/security/canister-upgrades.mdto reference the migration syntax for incompatible type changesUpdate timer re-registration pattern
guides/backends/timers.mdxusessystem func postupgradeto re-register timers. The new skill identifies timer IDs as the canonicaltransient varuse case.guides/backends/timers.mdxto presenttransient varas the preferred pattern and movepostupgradeto a note for legacy or complex casesDocument mops CLI commands in developer tools
references/developer-tools.mdmentions mops but not its primary commands.mops check,mops build,mops test,mops lint, andmops migratetoreferences/developer-tools.mdOut of scope
postupgradeincertified-variables.mdandcertification.md: legitimate use for re-establishing certifications after upgrade, not data migrationdocs/languages/motoko/: auto-synced from caffeinelabs/motoko, not manually editedPrerequisite
Wait for PR #208 to merge before starting. Several affected files are modified by that PR.