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

feat: implement binding specific errors [WPB-14352] #771

Merged
merged 9 commits into from
Nov 25, 2024

Commits on Nov 22, 2024

  1. feat: proteus error codes are Option<u16> not u32

    Returning an error code whose zero value indicates success is
    a reasonable pattern, in C.
    
    We are not programming in C.
    
    Eventually we're going to get rid of this pattern entirely. For now,
    we can at least use a real `Option` type to indicate whether an error
    in fact exists.
    
    Also, the Proteus implementation specifies that the error code is
    a `u16`. No idea why that got widened to a `u32`, but that was
    pointless, so it's back to a `u16` here.
    coriolinus committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    d2e9307 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2024

  1. feat: refactor WASM error types

    Clients only care about a limited set of errors, which we enumerated
    in the root issue. This commit refactors the client-visible errors
    (in WASM) to focus only on the set they care about.
    coriolinus committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    b13d88f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    17ce552 View commit details
    Browse the repository at this point in the history
  3. feat: refactor non-WASM error types

    Clients only care about a limited set of errors, which we enumerated
    in the root issue. This commit refactors the client-visible errors
    (other than WASM) to focus only on the set they care about.
    coriolinus committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    40b4576 View commit details
    Browse the repository at this point in the history
  4. test(wasm): fixup tests broken by recent changes

    Turns out there is a whole human-written section in the TS bindings which parses the
    output of our error types and turns it into a somewhat better error object.
    That needed to be updated to handle the new, simpler output serialization.
    coriolinus committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    bb9ea00 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d5f2880 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6b752ee View commit details
    Browse the repository at this point in the history
  7. chore(uniffi/jvm): get kotlin to build _at all_

    Kotlin tests are still failing due to previous changes, but at least
    the fundamental build operation is now succeeding. It's a start!
    
    Ran a Kotlin code formatter, intending only to hit the auto-generated files;
    turns out there were a bunch of human-maintained files in the tree also.
    Unfortunately, at that point, there were quite a lot of uncommitted changes.
    Didn't want to go through the effort of going back and unformatting the
    unrelated stuff, so that's all in here also.
    coriolinus committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    61c4f2f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8c34db6 View commit details
    Browse the repository at this point in the history