Ic-cdk 0.18.3 released

Hi everyone,

We’ve released ic-cdk v0.18.3. This release brings the removal of a few edge cases from v0.18.2, as well as support for the new root_key API and mirroring mainnet parameters for Bitcoin regtest.

If you are just now updating to 0.18 from 0.17 or before, we have prepared a migration guide that we recommend you read. There are changes to the call API, as well as changes to the execution order of code that calls spawn. The futures module also has new and improved documentation that describes behavior that already existed but many were not aware of; we recommend reading it.

If you have dependencies that also use the CDK, you may wind up with multiple versions of ic-cdk in your dependency tree. Unfortunately, 0.18.x is not compatible with 0.17.x or before. If you are on a version that has not been yanked, you will get a compile-time error if both versions are in your dependency tree; everything must upgrade to 0.18.x at the same time. In the future we expect such ‘ecosystem breaks’ to occur extremely rarely, possibly never. If this means you cannot upgrade to 0.18 yet, we still recommend you update to the latest patch version of your major release, as it may resolve an existing bug.

See the changelog for all release notes.


A warning on spawned futures: The new scheduler in 0.18.x permits spawned tasks to await manually triggered futures, thus potentially awaiting during one canister method call and resuming in the context of another canister method call. Calling a function like caller() will then produce data corresponding to the later method call, not the earlier one. We have determined, in hindsight, that this is an unnecessary footgun. It will not be removed from 0.18, since that would be a breaking change, but be aware that in a future release we expect to forbid spawned futures from resuming in different call contexts (a new function capable of doing this may be added).

If you had working code in 0.17 that you are upgrading, this section likely does not affect you. This is something that can only be done on purpose; it just has possibly surprising side effects.

7 Likes

Nice work! Excited to get this merged into Azle ASAP and move onto our release candidate to 1.0.