-
Notifications
You must be signed in to change notification settings - Fork 2
build!: update ic-cdk to v0.18.7
#21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3ddd9de to
59aedd8
Compare
ic-cdk to v0.18.7ic-cdk to v0.18.7
gregorydemay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, main comment is about error code.
lpahlavi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the review and feedback @gregorydemay! This should be ready for another round 🚀
gregorydemay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lpahlavi for this upgrade!
## 🤖 New release
* `canhttp`: 0.2.1 -> 0.3.0 (⚠ API breaking changes)
### ⚠ `canhttp` breaking changes
```text
--- failure enum_missing: pub enum removed or renamed ---
Description:
A publicly-visible enum cannot be imported by its prior path. A `pub use` may have been removed, or the enum itself may have been renamed or removed entirely.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/enum_missing.ron
Failed in:
enum canhttp::CyclesAccountingError, previously in file /tmp/.tmpHTwER4/canhttp/src/cycles/mod.rs:100
--- failure struct_missing: pub struct removed or renamed ---
Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/struct_missing.ron
Failed in:
struct canhttp::IcHttpRequestWithCycles, previously in file /tmp/.tmpHTwER4/canhttp/src/client/mod.rs:100
struct canhttp::CyclesCostEstimator, previously in file /tmp/.tmpHTwER4/canhttp/src/cycles/mod.rs:28
struct canhttp::CyclesAccounting, previously in file /tmp/.tmpHTwER4/canhttp/src/cycles/mod.rs:114
--- failure struct_with_pub_fields_changed_type: struct with pub fields became an enum or union ---
Description:
A struct with pub fields became an enum or union, breaking accesses to its public fields.
ref: obi1kenobi/cargo-semver-checks#297 (comment)
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/struct_with_pub_fields_changed_type.ron
Failed in:
struct canhttp::IcError became enum in file /tmp/.tmpeFTXb6/canhttp/canhttp/src/client/mod.rs:46
--- failure trait_missing: pub trait removed or renamed ---
Description:
A publicly-visible trait cannot be imported by its prior path. A `pub use` may have been removed, or the trait itself may have been renamed or removed entirely.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/trait_missing.ron
Failed in:
trait canhttp::CyclesChargingPolicy, previously in file /tmp/.tmpHTwER4/canhttp/src/cycles/mod.rs:10
```
<details><summary><i><b>Changelog</b></i></summary><p>
<blockquote>
## [0.3.0] - 2025-10-08
### Added
- **Breaking:** A new method `charge_cycles` that does the actual
charging was added to `CyclesChargingPolicy`
([#7](#7))
- Example of canister using the library to make HTTP requests
([#6](#6))
### Changed
- **Breaking:** Update `ic-cdk` to `v0.18.7` including several changes
to align with the new HTTP outcall API
([#21](#21)). Notably:
- `IcError` is refactored into an enum
- Use of the new `HttpRequestArgs` and `HttpRequestResult` types in
`CyclesChargingPolicy` and `Client` trait impls
- Removal of `IcHttpRequestWithCycles`, `CyclesCostEstimator`,
`CyclesAccountingError` and `CyclesAccounting` due to the `ic-cdk`
method for making HTTP outcalls now taking care of charging cycles
[0.3.0]:
https://github.com/dfinity/canhttp/compare/canhttp-v0.2.1..canhttp-v0.3.0
</blockquote>
</p></details>
---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Louis Pahlavi <louis.pahlavi@dfinity.org>
(XC-502) Update the
ic-cdkversion tov0.18. This is a major upgrade of theic-cdkand as such is a breaking change forcanhttp.BREAKING: There are multiple breaking changes in this PR:
IcErroris refactored into an enum with two variants forCallRejectedandInsufficientLiquidCycleBalance.IcHttpRequestWithCyclesandhttp::CyclesCostEstimatorare removed.Client:Service<IcHttpRequestWithCycles>Service<ic_management_canister_types::HttpRequestArgs>CyclesAccounting:Convert<ic_cdk::api::management_canister::http_request::CanisterHttpRequestArgument>Filter<ic_management_canister_types::HttpRequestArgs>CyclesAccounting::newno longer takes anum_nodes_in_subnetargument.CyclesChargingPolicy::charge_cyclesnow takes aic_management_canister_types::HttpRequestArgsas argument.