You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: evaluations/mops-cli.json
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,16 @@
73
73
"Does NOT place warning flags in [build].args (those are build-only)"
74
74
]
75
75
},
76
+
{
77
+
"name": "Replica tests pocket-ic pin",
78
+
"prompt": "I'm adding replica-mode tests (actor files / `// @testmode replica`) to my mops project and `mops test --mode replica` prints a warning about the dfx replica. How do I configure mops so it doesn't fall back to the deprecated dfx replica? Just the config change.",
79
+
"expected_behaviors": [
80
+
"Explains the warning is because `pocket-ic` is not pinned in `[toolchain]`, so mops falls back to the deprecated dfx replica",
81
+
"Pins `pocket-ic` in the `[toolchain]` section of mops.toml (e.g. `pocket-ic = \"12.0.0\"`) OR uses `mops toolchain use pocket-ic 12.0.0`",
82
+
"Pins a specific pocket-ic version rather than `latest` (latest may resolve to a version the bundled pic-js client doesn't support)",
83
+
"Notes the same pin also applies to `mops bench` and `mops watch`"
84
+
]
85
+
},
76
86
{
77
87
"name": "Adversarial: file path to mops check",
78
88
"prompt": "I want to type-check my canister. My main file is at src/backend/main.mo. I'll run: mops check src/backend/main.mo. Is that right?",
Copy file name to clipboardExpand all lines: skills/mops-cli/SKILL.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
name: mops-cli
3
3
description: "Manage Motoko projects with the mops CLI — toolchain pinning, dependency management, type-checking, building, and linting. Use when working with mops.toml, mops.lock, running mops commands, adding/removing packages, pinning moc or lintoko versions, checking or building canisters, configuring moc flags, or setting up a new Motoko project."
1.**No dfx** — always pin `moc` in `[toolchain]`. Use the newest `moc` version.
17
+
1.**No dfx** — always pin `moc` in `[toolchain]`. Use the newest `moc` version. Pin `pocket-ic` too if you have replica tests or benchmarks (otherwise `mops test --mode replica`, `mops bench`, and `mops watch` fall back to the deprecated dfx replica and print a warning).
18
18
2.**No `mo:base`** — it is deprecated. Always use `mo:core` (`import Array "mo:core/Array"`).
19
19
3.**All config in `mops.toml`** — canisters, moc flags, toolchain versions, build settings.
20
20
4.**Canister-centric workflow** — define all canisters in `[canisters]`; never pass file paths to `mops check`. Exception: library packages (no `[canisters]`) use file paths directly: `mops check src/**/*.mo`.
**Always use canister names, not file paths.** Per-canister args from `mops.toml` are applied automatically.
110
111
111
-
`--fix` applies machine-applicable fixes from both moc and lintoko in one pass.
112
+
`--fix` applies machine-applicable fixes from both moc and lintoko in one pass. Concurrent `--fix` runs (across processes) serialize automatically via an advisory lock at `.mops/fix.lock` — safe to invoke from multiple agents on the same project.
112
113
113
114
### `mops build`
114
115
@@ -127,6 +128,7 @@ Produces `.wasm`, `.did`, and `.most` files in `[build].outputDir` (default `.mo
127
128
mops toolchain use moc 1.7.0 # pin specific version
128
129
mops toolchain use moc latest # pin latest version (non-interactive)
129
130
mops toolchain use lintoko 0.10.0 # pin specific version
131
+
mops toolchain use pocket-ic 12.0.0 # pin for replica tests / benchmarks (pin a specific version; `latest` may resolve to one the bundled pic-js client doesn't support)
130
132
mops toolchain update moc # update to latest (requires existing [toolchain] entry)
131
133
mops toolchain update # update all tools to latest
132
134
mops toolchain bin moc # print path to binary
@@ -154,6 +156,7 @@ mops remove base
154
156
mops outdated # list outdated dependencies (caret-bound)
155
157
mops update # update all within caret bound (no major-version crossing)
156
158
mops update core # update specific package within caret bound
159
+
mops update --patch # restrict to patch bumps only (mutually exclusive with --major)
157
160
mops update --major # allow updates that cross major versions
158
161
mops sync # add missing / remove unused packages
159
162
```
@@ -172,6 +175,8 @@ mops test --reporter verbose # show Debug.print output
172
175
mops test --watch # re-run on file changes
173
176
```
174
177
178
+
Replica tests (actor files or `// @testmode replica`) use `pocket-ic` from `[toolchain]`. With no pin they fall back to the deprecated `dfx` replica (warning printed) — pin `pocket-ic` in `[toolchain]` to silence it. Same applies to `mops bench` and `mops watch`.
179
+
175
180
### `mops lint`
176
181
177
182
Runs lintoko (also runs automatically as part of `mops check` when lintoko is in toolchain):
0 commit comments