What's a .most file

After the upgrade to dfx v0.9.2 I noticed that the dfx build command now generates a additional file for my canisters with the extension .most

Out of curiosity, what are these .most files?

1 Like

Yeah particularly because I get errors if I redeploy after some modification.

❯ dfx deploy --network=ic --no-wallet manager
Deploying: manager
All canisters have already been created.
Building canisters…
Installing canisters…
WARNING!
Stable interface compatibility check failed for canister ‘manager’.
Upgrade will either FAIL or LOSE some stable variable data.
…/.dfx/ic/canisters/manager/manager.old.most:1.28-1.36: type error [M0029], unbound type BucketId
Do you want to proceed? yes/No

Looks like it might have to do with a new stable types upgrade compatibility feature.
My guess it’s the stable type is not compatible with changes made

--stable-types: emit signature of stable types to .most file

1 Like

Note that there’s a bug in the moc version dfx 0.9.2 uses (you can ignore the warning if you’re confident you’ve not made any breaking changes), see here:

1 Like

Indeed it look like I can safely ignore the warning. I actually did loose some stable variables today but it’s because I am an idiot :sweat_smile:.

Regarding my original question, I then understand that .most files are files that contain the candid representation of stable variables / types of my canisters.

Thanks for the feedback @Ori and @Gekctek

1 Like

Almost, it’s actually not Candid, but a Motoko type signature for the stable variables and goes beyond Candid by allowing mutable data and parameterized type definitions.

The Motoko data is itself stored in an extended Candid format, but that’s an implementation detail that is likely to change in future (without affecting external behaviour).

2 Likes

Thanks for the explanation @claudio

What does most stand for? My guess is “motoko stable types” but I’m not confident…

1 Like

Yep.

Are we at 20 characters yet?