Skip to content
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

Refactor the call API (breaking changes) #2650

Merged
merged 23 commits into from
Feb 7, 2025
Merged

Refactor the call API (breaking changes) #2650

merged 23 commits into from
Feb 7, 2025

Conversation

lastmjs
Copy link
Member

@lastmjs lastmjs commented Feb 4, 2025

Contributor

  • Code has been declaratized
  • All new functions have JSDoc/Rustdoc comments
  • Error handling beautiful (no unwraps or expects etc)
  • Code tested thoroughly
  • PR title:
    • Indicates breaking changes with suffix "(breaking changes)"
    • Sentence cased
  • Related issues have been linked and all tasks have been completed or made into separate issues
  • New documentation enumerated in the release issue
  • All breaking changes
    • Described below in the "Breaking Changes" section
    • Migration path described

Reviewer

Breaking Changes

call has had a number of fundamental changes made to it.

The raw property is now a boolean, and simply toggles encoding of the arguments and decoding of the return value. If raw is true, the args property should be a Uint8Array. Omitting args or passing in undefined when raw is set to true will automatically Candid encode the empty argument.

We have also removed the notify function. call now has a oneway property that if set to true will immediately resolve the promise and return void.

The error thrown from an unsuccessful call now has a slightly different message.

@lastmjs lastmjs changed the title New call api Refactor the call API (breaking changes) Feb 4, 2025
@lastmjs lastmjs linked an issue Feb 4, 2025 that may be closed by this pull request
17 tasks
@lastmjs lastmjs changed the base branch from main to inspect_message_refactor February 6, 2025 18:36
@lastmjs lastmjs changed the base branch from inspect_message_refactor to main February 6, 2025 18:38
@lastmjs lastmjs changed the base branch from main to inspect_message_refactor February 6, 2025 18:38
@lastmjs lastmjs changed the base branch from inspect_message_refactor to main February 6, 2025 19:51
@lastmjs lastmjs marked this pull request as ready for review February 6, 2025 19:57
@lastmjs lastmjs enabled auto-merge February 6, 2025 19:57
@lastmjs lastmjs requested a review from bdemann February 6, 2025 19:57
@lastmjs lastmjs requested a review from bdemann February 7, 2025 21:13
@lastmjs lastmjs merged commit b6449bb into main Feb 7, 2025
374 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants