Skip to content

upstream sync available — caffeinelabs/mops cli-v2.14.0 → cli-v2.15.2 #234

Description

@pr-automation-bot-public

Upstream diff: caffeinelabs/mops cli-v2.14.0cli-v2.15.2

Commit: 564a380c9450

To sync: create branch chore/sync-upstream-mops-cli-v2.15.2, follow the
Upstream Sync Strategy
in CLAUDE.md, run npm run validate, and open a PR that closes this issue.

Before applying: check .claude/upstream.md for icskills-owned sections.
Do NOT overwrite those sections from upstream. Also check whether any owned
section is now covered by the upstream changes — if so, drop the icskills copy
and remove it from the owned list to avoid duplicating content.

mops-cli ← upstream mops-cli

SKILL.md

Show diff (- old upstream, + new upstream)
41c41
< path = ".old/src/backend/dist/backend.most"
---
> path = "deployed/backend.most"
48c48
< `check-stable` verifies stable variable compatibility against a `.most` file from the deployed version. For a new project with no prior deployment, create a trivial `.most` file representing an empty actor:
---
> `check-stable` runs ICP's upgrade-time stable-variable compatibility check locally, so incompatible changes fail in `mops check` instead of being rejected when upgrading a live canister. It compares the current code against a `.most` from the deployed version.
50,55c50
< ```most
< // Version: 1.0.0
< actor {
<   
< };
< ```
---
> Bootstrap that `.most`: new project → `mops deployed init` (empty-actor baseline); already-deployed canister → build from the deployed commit, then `mops deployed`. After every deploy, run `mops deployed` to promote the just-built `.most` (see [`mops deployed`](#mops-deployed) below).
107c102
< `--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.
---
> `--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. Read-only files (e.g. frozen migrations) are skipped with a warning, not fixed.
119a115,136
> ### `mops deployed`
> 
> Post-deploy hook — keeps the on-disk `.most` baseline used by `check-stable` in sync with what's actually deployed.
> 
> ```bash
> mops deployed init backend   # one-time bootstrap: empty-actor baseline + sets [check-stable].path
> mops deployed backend        # post-deploy: promotes .mops/.build/backend.most → deployed/backend.most
> mops deployed                # all canisters
> ```
> 
> Default destination is `deployed/<name>.most`; override with `[deployed].dir` in `mops.toml` or `--dir`. It reads built `.most` files from `[build].outputDir` (default `.mops/.build`); override with `--build-dir`. `mops deployed` errors if the source `.most` is missing — it never regenerates. Run it from your deploy pipeline immediately after a successful deploy.
> 
> ### `mops generate candid`
> 
> ```bash
> mops generate candid                # all canisters
> mops generate candid backend        # single canister
> mops generate candid backend -o <path>   # single canister, ad-hoc path
> ```
> 
> (Re)generates the curated `.did` from current Motoko source. With `[canisters.<name>].candid` set, overwrites that file. Without it, writes `<name>.did` next to `main` (e.g. `main = "src/Backend.mo"` → `src/backend.did`) and sets `[canisters.<name>].candid` in `mops.toml`. Run after every interface change; commit `.did` + `mops.toml` together. Same moc invocation as `mops build`, so the result always passes `mops build`'s subtype check.
> 
141a159,162
> Override `check-limit` for a single run with `--no-check-limit` (`mops check`, `mops check-stable`, `mops lint`) — e.g. `mops check --fix --no-check-limit` to autofix older, normally-trimmed migrations. On `mops check` and `mops check-stable`, `--no-check-limit` also suppresses the pending-migration warning.
> 
> When `check-limit` is set, `mops check-stable` (and the stable check inside `mops check`) reports if more migrations are pending than the limit allows — as an error if compat failed (replacing the misleading `moc` message), otherwise a warning.
> 
185c206
< When `[canisters.<name>.migrations].check-limit` is set, `mops lint` skips the trimmed chain migrations to match what `moc` sees during `mops check`. To lint a trimmed migration on demand, pass an explicit filter (e.g. `mops lint OldMigrationName`).
---
> When `[canisters.<name>.migrations].check-limit` is set, `mops lint` skips the trimmed chain migrations to match what `moc` sees during `mops check`. To lint a trimmed migration on demand, pass an explicit filter (e.g. `mops lint OldMigrationName`) or `--no-check-limit` to lint the full chain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstream-mopsUpstream sync: caffeinelabs/mops

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions