dfinity / motoko

Simple high-level language for writing Internet Computer canisters
Apache License 2.0
517 stars 97 forks source link

Bring internal interface of ic00 up-to-date #2510

Closed crusso closed 3 years ago

crusso commented 3 years ago

Motoko's asserted ic00 type in internals.mo no longer coincides with that of the spec, e.g. create_canister now takes a record argument but Motoko still just assumes a unit argument. I've just about convinced myself that is still ok, given Candid rules (tuples are records, and the record only has an optional field) but is that actually the case (@nomeata?).

nomeata commented 3 years ago

It is not the case that () <: (record { … }); this was a breaking change. The replica still supports both interfaces, as per transition plan (see PR description of https://github.com/dfinity-lab/ic-ref/pull/250), but ic-ref does not. (Tension between the reference implementation purpose and emulator purpose).

But since (record {…}) <: () we should upgrade now; it’ll still work with old ic-ref, but ideally we have changd that by the time the SDK team upgrades to ic-ref 0.17

nomeata commented 3 years ago

You can bump ic-ref to release-0.17 as you do this.