diff --git a/Cargo.toml b/Cargo.toml index f75fc519c..65ecb166b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,11 +32,11 @@ opt-level = 'z' [workspace.dependencies] ic0 = { path = "ic0", version = "1.0.1" } -ic-cdk = { path = "ic-cdk", version = "0.19.0-beta.3" } +ic-cdk = { path = "ic-cdk", version = "0.19.0" } ic-cdk-bindgen = { path = "ic-cdk-bindgen", version = "0.2.0-alpha.2" } -ic-cdk-timers = { path = "ic-cdk-timers", version = "1.0.0-beta.1" } -ic-cdk-executor = { path = "ic-cdk-executor", version = "2.0.0-beta.1" } -ic-management-canister-types = { path = "ic-management-canister-types", version = "0.4.1" } +ic-cdk-timers = { path = "ic-cdk-timers", version = "1.0.0" } +ic-cdk-executor = { path = "ic-cdk-executor", version = "2.0.0" } +ic-management-canister-types = { path = "ic-management-canister-types", version = "0.5.0" } candid = "0.10.18" # sync with the doc comment in ic-cdk/README.md candid_parser = "0.2.1" diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 7caef7c42..ebeca9d99 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -17,10 +17,10 @@ Only one package in the dependency graph may specify the same links value. This failed to select a version for `ic-cdk-executor` which could resolve this conflict ``` -You have two incompatible versions of `ic-cdk` in your dependency tree. There are two common reasons for this. +You have two incompatible versions of `ic-cdk` (or `ic-cdk-timers`) in your dependency tree. There are two common reasons for this. -First, a dependency may be using an older (or newer) version of the CDK. Many versions are compatible with each other, but versions 0.17 and earlier are incompatible with version 0.18, and 0.18 is incompatible with 0.19 or later. You will have to wait for those dependencies to update, or patch them yourself. +First, a dependency may be using an older (or newer) version of the CDK. Many versions of `ic-cdk` are compatible with each other, but versions 0.17 and earlier are incompatible with version 0.18, and 0.18 is incompatible with 0.19 or later. `ic-cdk-timers` does not have non-semver compatibility and any two versions are incompatible. In either case you will have to wait for those dependencies to update, or patch them yourself. -Second, a dependency may be using a nominally compatible version of the CDK, but you are using a GitHub prerelease of the CDK with `ic-cdk = { git =`. Git dependencies are automatically incompatible with everything, even if nothing changed. You will need to create a [patch table](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html) that replaces `ic-cdk` with a Git dependency at the same commit (you may also need to replace `ic-cdk-executor`). +Second, a dependency may be using a nominally compatible version of the CDK, but you are using a GitHub prerelease of the CDK with `ic-cdk = { git =`. Git dependencies are automatically incompatible with everything, even if nothing changed. You will need to create a [patch table](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html) that replaces all CDK dependencies with a Git dependency at the same commit. You can find the dependencies responsible with the command `cargo tree -i ic-cdk`. diff --git a/ic-cdk-executor/CHANGELOG.md b/ic-cdk-executor/CHANGELOG.md index 663ced2db..d6af4f1bd 100644 --- a/ic-cdk-executor/CHANGELOG.md +++ b/ic-cdk-executor/CHANGELOG.md @@ -7,12 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -## [2.0.0-beta.1] - 2025-10-09 +## [2.0.0] - 2025-11-13 ### Changed - Breaking: The API has been significantly revised. - - `spawn` has been replaced with `spawn_local` and `spawn_migratory`. Local tasks are cancelled when the method ends. + - `spawn` has been replaced with `spawn_protected` and `spawn_migratory`. Protected tasks are cancelled when the method ends. - Contexts are now 'tracking', meaning that they know when canister methods start and end. Calls to `ic0.call_*` must be accompanied by `extend_current_method_context`; `in_callback_executor_context_for` takes this value. - Cancellation is no longer done per-task with the waker, but per-method with the function `cancel_all_tasks_attached_to_current_method`. diff --git a/ic-cdk-executor/Cargo.toml b/ic-cdk-executor/Cargo.toml index 23b77d31e..f5421f031 100644 --- a/ic-cdk-executor/Cargo.toml +++ b/ic-cdk-executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ic-cdk-executor" -version = "2.0.0-beta.1" +version = "2.0.0" authors.workspace = true edition.workspace = true repository.workspace = true diff --git a/ic-cdk-macros/Cargo.toml b/ic-cdk-macros/Cargo.toml index 72e439124..e689d521c 100644 --- a/ic-cdk-macros/Cargo.toml +++ b/ic-cdk-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ic-cdk-macros" -version = "0.19.0-beta.3" # sync with ic-cdk +version = "0.19.0" # sync with ic-cdk authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ic-cdk-timers/CHANGELOG.md b/ic-cdk-timers/CHANGELOG.md index 258755359..d653e4267 100644 --- a/ic-cdk-timers/CHANGELOG.md +++ b/ic-cdk-timers/CHANGELOG.md @@ -6,12 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] -- Breaking: Interval timer bodies have been changed from `AsyncFnMut()` to `FnMut() -> impl Future`; some code may need to be changed from `async || {` to `|| async {`. - -## [1.0.0-beta.1] - 2025-10-09 +## [1.0.0] - 2025-11-13 - `ic-cdk-timers` no longer has a dependency on `ic-cdk` and no longer needs to be upgraded when `ic-cdk` is upgraded. -- Breaking: Timer bodies have been changed from `FnOnce`/`FnMut` to `Future`/`AsyncFnMut`, so `spawn` is no longer required to enter an async context from a timer. For `set_timer`, `|| {}` should be changed to `async {}`, and for `set_timer_interval`, `|| {}` should be changed to `async || {}`. +- Breaking: Timer body function signatures have been updated which eliminating the need for explicit `spawn` calls within timer callbacks. + - `set_timer`: now takes `impl Future`. `|| {}` should be changed to `async {}`, + - `set_timer_interval`: now takes `FnMut() -> impl Future`. `|| {}` should be changed to `|| async {}`. + - `set_timer_interval_serial`: new function, takes `AsyncFnMut()`. - If you have any immediate `spawn` calls, you can remove them and run the async code directly. (You do not have to.) ## [0.12.2] - 2025-06-25 diff --git a/ic-cdk-timers/Cargo.toml b/ic-cdk-timers/Cargo.toml index 7566155fc..c676a5f11 100644 --- a/ic-cdk-timers/Cargo.toml +++ b/ic-cdk-timers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ic-cdk-timers" -version = "1.0.0-beta.1" +version = "1.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -12,7 +12,10 @@ documentation = "https://docs.rs/ic-cdk-timers" readme = "README.md" categories = ["api-bindings", "data-structures", "no-std", "development-tools::ffi"] keywords = ["internet-computer", "dfinity", "canister", "cdk"] -include = ["src", "Cargo.toml", "LICENSE", "README.md"] +include = ["src", "Cargo.toml", "LICENSE", "README.md", "build.rs"] +# DO NOT change this field, not even to update the link, unless you are updating every existing version of the package. +# Update the link by updating the links-pin tag. +links = "ic-cdk-timers (canister_global_timer), see https://github.com/dfinity/cdk-rs/blob/links-pin/TROUBLESHOOTING.md" [dependencies] ic0.workspace = true diff --git a/ic-cdk-timers/README.md b/ic-cdk-timers/README.md index 5cd0fc921..ea93d4407 100644 --- a/ic-cdk-timers/README.md +++ b/ic-cdk-timers/README.md @@ -16,7 +16,7 @@ In `Cargo.toml`: ```toml [dependencies] -ic-cdk-timers = "0.9.0" +ic-cdk-timers = "1.0.0" ``` To schedule a one-shot task to be executed 1s later: diff --git a/ic-cdk-timers/build.rs b/ic-cdk-timers/build.rs new file mode 100644 index 000000000..884ac9476 --- /dev/null +++ b/ic-cdk-timers/build.rs @@ -0,0 +1,3 @@ +fn main() { + // dummy build script, required by `package.links` +} diff --git a/ic-cdk/CHANGELOG.md b/ic-cdk/CHANGELOG.md index 54603c49b..e3755d9b5 100644 --- a/ic-cdk/CHANGELOG.md +++ b/ic-cdk/CHANGELOG.md @@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] -## [0.19.0-beta.3] - 2025-10-09 +## [0.19.0] - 2025-11-13 ### Added diff --git a/ic-cdk/Cargo.toml b/ic-cdk/Cargo.toml index 2a1f60966..aebac132a 100644 --- a/ic-cdk/Cargo.toml +++ b/ic-cdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ic-cdk" -version = "0.19.0-beta.3" # sync with ic-cdk-macros and the doc comment in README.md +version = "0.19.0" # sync with ic-cdk-macros and the doc comment in README.md authors.workspace = true edition.workspace = true license.workspace = true @@ -23,7 +23,7 @@ ic-cdk-executor.workspace = true # Dependents won't accidentaly upgrading ic-cdk-macros only but not ic-cdk. # ic-cdk-macros is a hidden dependency, re-exported by ic-cdk. # It should not be included by users direcly. -ic-cdk-macros = { path = "../ic-cdk-macros", version = "=0.19.0-beta.3" } +ic-cdk-macros = { path = "../ic-cdk-macros", version = "=0.19.0" } ic-error-types = "0.2.0" ic-management-canister-types.workspace = true pin-project-lite = "0.2.16" diff --git a/ic-cdk/README.md b/ic-cdk/README.md index dd83f9214..f2e335246 100644 --- a/ic-cdk/README.md +++ b/ic-cdk/README.md @@ -25,7 +25,7 @@ In Cargo.toml: crate-type = ["cdylib"] [dependencies] -ic-cdk = "0.18" +ic-cdk = "0.19" candid = "0.10" # required if you want to define Candid data types ``` diff --git a/ic-management-canister-types/CHANGELOG.md b/ic-management-canister-types/CHANGELOG.md index 54f7a5917..86764c36a 100644 --- a/ic-management-canister-types/CHANGELOG.md +++ b/ic-management-canister-types/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [0.5.0] - 2025-11-13 + ### Changed - Removed `SettingsChange` variant from `ChangeDetails`. diff --git a/ic-management-canister-types/Cargo.toml b/ic-management-canister-types/Cargo.toml index 362e4cf3d..bb193776c 100644 --- a/ic-management-canister-types/Cargo.toml +++ b/ic-management-canister-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ic-management-canister-types" -version = "0.4.1" +version = "0.5.0" authors.workspace = true edition.workspace = true repository.workspace = true diff --git a/library/ic-ledger-types/CHANGELOG.md b/library/ic-ledger-types/CHANGELOG.md index a18b79674..42cabb369 100644 --- a/library/ic-ledger-types/CHANGELOG.md +++ b/library/ic-ledger-types/CHANGELOG.md @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [0.16.0] - 2025-11-12 + +### Changed + +- Upgrade `ic-cdk` to v0.19. + ## [0.15.0] - 2025-04-22 ### Changed diff --git a/library/ic-ledger-types/Cargo.toml b/library/ic-ledger-types/Cargo.toml index 7454b3160..ea6a028aa 100644 --- a/library/ic-ledger-types/Cargo.toml +++ b/library/ic-ledger-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ic-ledger-types" -version = "0.15.0" +version = "0.16.0" authors.workspace = true edition.workspace = true license.workspace = true