Releases: caffeinelabs/motoko
Release list
1.15.0
-
motoko (
moc)-
feat: with
--stable-baselineand--enhanced-migration, the migration
directory is now validated against the migration history the baseline
records as already applied: a deployed migration that was deleted (unless
all older ones are deleted too), edited in place, or a local migration
backdated to sort before the deployed head reports the new M0268
diagnostic, a warning treated as an error by default (demote with
-W=M0268, silence with-A=M0268) (#6325). -
bugfix: with
--stable-baselineand--enhanced-migration, the M0254/M0267
check now honors the migrations the baseline records as already applied:
requirements are computed at the chain's resume point instead of replaying
the whole chain, and fields the baseline explains no longer warn M0254;
a field missing from the baseline errors with M0267 naming the resume
point, while an incompatible one keeps the detailed M0170/M0216
compatibility errors. Each problem is reported once, and the
write-a-migration hint is only offered when adding a migration file can
actually fix the field (#6318). -
bugfix: fixes compilation error on -enabled mixin (#6328).
-
1.14.1-fix-stable-baseline
chore(deps): Bump DeterminateSystems/update-flake-lock from 0281a39e4…
1.14.1
1.14.0
-
motoko (
moc)-
feat: Structural implicit derivation now supports variants via the
__variantcombiner ((Text, () -> E) -> R).
The synthesized wrapper switches on the active case and applies the combiner to its(tag, payload thunk),
deriving operations like serialization for any variant whose case payloads have instances (#6192). -
feat: the default maximum for stable memory (
--max-stable-pages) is now 100 GiB
(was 4 GiB), raising the default ceiling for theRegionlibrary.
Override with--max-stable-pages <n>as before (#6279). -
bugfix: implement the new Candid subtyping rule
service <actortype> <: principal
(dfinity/candid#748): service references now decode at typePrincipal, both when
decoded directly and in deferred subtype checks on function references (#6275). -
bugfix: a
classin expression position lowered to unit instead of its
constructor (#6291). -
bugfix: a self tail call whose argument is a tuple-returning expression
crashed the compiler (or miscompiled, with the IR check off) (#6292).
-
1.13.0
-
motoko (
moc)-
feat: import a local Candid file as a types-only Motoko module via the
idl:URI scheme —
import S "idl:foo.did"exposesS.Self(the service actor type) and named
Candid types, PascalCased when unambiguous (e.g.user_id→S.UserId). No principal or
--actor-idlflags required (#6263). -
chore: multi-value Wasm codegen is now always on;
--(no-)experimental-multi-valueare kept for CLI compatibility but have
no effect (#6266).
-
1.12.0
-
motoko (
moc)-
feat: the excess-precision warning (M0266) now also covers
Float(F64) literals, not just
Float32, suggesting the shortest round-trip equivalent (#6261). -
feat:
--stable-baseline <file.most>with--enhanced-migrationescalates unexplained
"initial actor requires field" cases to error M0267; fields whose baseline type is a
stable subtype of the required type keep warning M0254 (prototype for legacy→EM
conversions) (#6249). -
feat:
--stable-baselinealso runs the same upgrade check as--stable-compatibleduring
--check, so tools can typecheck and verify upgrade safety in onemocinvocation (#6253). -
fix: refresh the broken docs links in compatibility and stable-memory diagnostics (#6255).
-
1.11.2-stable-baseline-check-compat
feat: `--stable-baseline` turns forgotten EM fields into M0267 (#6249) Tracks [LANG-1348](https://linear.app/caffeinelabs/issue/LANG-1348/check-time-stable-baseline-for-em-m0267-single-invocation-stable). Converted legacy→enhanced-migration projects can't promote M0254 to an error: the migration chain often still "requires" fields that already lived on the last deployed canister. Agents then add a new actor field without a migration, get only a soft warning, and fail at deploy time. `--stable-baseline <last.most>` keeps the same `initial_required` set: fields explained by the baseline (stable subtype) stay **M0254**, and unexplained ones escalate to error **M0267**. ### Before / After ```bash # converted project: field `x` already on last deploy, no Init for it moc --check --enhanced-migration migrations/ actor.mo # warning [M0254], initial actor requires field `x` moc --check --enhanced-migration migrations/ \ --stable-baseline last.most actor.mo # warning [M0254] for `x` (carried by baseline) # agent adds `email` with no migration moc --check --enhanced-migration migrations/ \ --stable-baseline last.most actor.mo # type error [M0267] on the actor field `email` ... ``` ### Diagnostic location (intentional) **M0254** stays on the first migration file (same as today — “required at the start of the chain”). **M0267** points at the **actor field** instead. The walked “first migration” locus would only guess `m1.mo:1:1`; for a forgotten new field we want the declaration the agent just added, not the oldest migration in the chain. ### What is unchanged - No baseline → today's M0254 warning only - `--stable-compatible` upgrade checking is unchanged - Prototype: no mops/caffeine wiring yet; `moc.js` does not share the CLI flag guard Follow-up (check-time stable-compat / single-invocation mops): [#6253](https://github.com/caffeinelabs/motoko/pull/6253). --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1.11.2
-
motoko (
moc)- bugfix:
--implicit-package=<pkg>was incorrectly using all transitively loaded modules for implicit argument and contextual dot resolution instead of restricting to the given package (#6242).
- bugfix:
1.11.1
-
motoko (
moc)- refactor: simplifies bounds checks for candid decoding in the RTS (#6240).
- fix: fix codegen for nested mixins (#6223).
- deprecation: removed the legacy
-multi-value/-no-multi-valueflags;--experimental-multi-valueand
--no-experimental-multi-valuenow warn as deprecated — multi-value Wasm codegen is the default (#6206).
1.11.0
-
motoko (
moc)-
feat:
mocnow emits the standardizedtarget_featuresWasm custom section, sobinaryen-based tools (wasm-opt,ic-wasm optimize,dfx'soptimize) accept and optimize Motoko output without per-tool feature flags. Previously these tools defaulted to MVP and rejected themultivalue/bulk-memory/memory64features moc relies on (#6214). -
feat: a
Float32literal written with more precision than the type can hold now warns (M0266), suggesting the shortest equivalent — e.g.0.123456789 : Float32→0.12345679. The surplus digits were already silently discarded by rounding; the warning fires only on genuine excess (minimal literals like0.1/3.14stay quiet) (#6198). -
feat: allow requiring
systemcapability formixindefinitions (#6211).
This makes the capability available in initializers and themixinbody.
<system>then needs to appear on the correspondinginclude. -
feat: allow effectful code in transient
lets and inactor/mixinbodies with--enhanced-migration(#6191). -
bugfix:
--enhanced-migrationnow also applies tomixins and considers their stable fields when checking migrations (#6183).
-