1. Apr 13, 2023
  2. Apr 11, 2023
  3. Mar 30, 2023
    • Niklas Adolfsson's avatar
      fix: tokio v1.27 (#1062) · 118acc39
      Niklas Adolfsson authored
      * fix: tokio v1.27
      
      * Update server/src/transport/ws.rs
      
      * fix rustdoc
      
      * Update server/src/transport/ws.rs
      
      * Update server/src/transport/ws.rs
      
      * no more futuredriver for incoming conns
      
      * add comment for unclear code
      118acc39
  4. Mar 24, 2023
  5. Mar 23, 2023
    • Niklas Adolfsson's avatar
      rpc module: refactor subscriptions to return `impl IntoSubscriptionResponse` (#1034) · 7144be54
      Niklas Adolfsson authored
      
      
      * refactor subscription to return `Option<Result<>>`
      
      * address grumbles: change to Result<(), Option<M>>
      
      This changes the subscription API again to return `Result<(), Option<SubscriptionMessage>>`
      to work a little smoother with the combinators and it introduces an extention trait
      to make convert it `Result<T, Error>` to `Result<T, Option<SubscriptionMessage>>`
      
      This trait is implemented for types where it is possible and for custom types and tricky situations the
      user has to implement themselves.
      
      For instance it's not possible to implement on `TrySendError` because that depends on the use-case
      i.e. whether the channel is full should be regarded as an error or not.
      
      * remove weird default errors
      
      * fix tests
      
      * revert weird trait
      
      * introduce `IntoSubscriptionResult`
      
      * refactor: introduce subscription mod
      
      * impl StdError for subscription error types
      
      * fix nits + tests
      
      * fix doc tests
      
      * remove deadcode
      
      * Update server/src/tests/ws.rs
      
      * cleanup to make review easier
      
      * SubscriptionAcceptError -> PendingSubscriptionAcceptError
      
      * make it clear that SubscriptionPermit is mocked
      
      * remove deadcode
      
      * fix doc links
      
      * make register_subscription more readable
      
      * remove Option impl for IntoSubscriptionCloseResponse
      
      * fix tests
      
      * add test for subscription return type
      
      * fix nits
      
      * impl `IntoSubscriptionCloseResponse` for ()
      
      * remove useless ui test
      
      * Update core/src/server/error.rs
      
      * register_subscription: change order of parameters
      
      * Update core/src/server/error.rs
      
      * Update proc-macros/src/lib.rs
      
      * fix doc link
      
      * proc macro: compile test for !Result
      
      * hacky solution
      
      * add niklas ugly hack for providing default value
      
      * fix hacks
      
      * cargo fmt
      
      * Update core/src/server/subscription.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * fix grumbles
      
      * fix tests
      
      * add test for null notification
      
      * impl IntoSubscriptionResponse for Result<(), E>
      
      * more descriptive error impls
      
      * Update core/src/server/subscription.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * update docs: Subscription::next
      
      * revert UI tests
      
      * proc macro tests: add subscription -> ()
      
      * remove unused tokio feature
      
      * show failing test
      
      * fix tests
      
      * revert JSON str parsing
      
      * add `SerializeAsStr` error
      
      * show James
      
      * push hack to show James what I mean
      
      * SubscriptionResult = Result<(), StringError>
      
      * fix tests
      
      * address grumbles
      
      * Update core/src/server/subscription.rs
      
      * Update proc-macros/src/lib.rs
      
      * Update proc-macros/src/lib.rs
      
      * remove unused error variant SubscriptionCallbackError
      
      ---------
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      7144be54
  6. Mar 21, 2023
  7. Mar 16, 2023
  8. Mar 14, 2023
  9. Mar 06, 2023
  10. Mar 01, 2023
  11. Feb 27, 2023
  12. Feb 24, 2023
  13. Feb 23, 2023
  14. Feb 22, 2023
  15. Feb 21, 2023
  16. Feb 20, 2023
  17. Feb 18, 2023
  18. Feb 17, 2023
  19. Feb 16, 2023
  20. Feb 15, 2023
  21. Feb 13, 2023
  22. Feb 09, 2023
    • bear's avatar
      Update error codes (#1004) · f542a005
      bear authored
      * chore: update error code
      
      * chore: format
      
      * chore: try fix ci
      
      * chore: fix ci
      f542a005
  23. Feb 08, 2023
    • Niklas Adolfsson's avatar
      server: bounded channels and backpressure (#962) · 5faac4f1
      Niklas Adolfsson authored
      
      
      * bounded channels
      
      * remove bounded subscriptions
      
      * remove resource limiting
      
      * kill connection once message tx fails
      
      * switch to tokio::mpsc
      
      * fix nits
      
      * make futures_channel hard dependency
      
      * add real backpressure to rx
      
      * PoC with crossbeam queue
      
      * remove pipe_from_stream
      
      * bring back Pending and SubscriptionSink again
      
      * more refactoring
      
      * add example of old APIs
      
      * introduce opaque SubscriptionMessage
      
      * feat: make subscription callbacks async
      
      * fix tests
      
      * move non-jsonrpc spec types from types
      
      * fix nits
      
      * improve docs
      
      * add pipe_from_stream APIs back
      
      * cleanup
      
      * Update core/src/server/helpers.rs
      
      * Update server/src/server.rs
      
      * more cleanup
      
      * Update core/src/server/helpers.rs
      
      * small fixes
      
      * rpc module: add unit test for backpressure
      
      * doc fixes
      
      * fix more nits
      
      * refactor: pipe_from_stream
      
      * fix examples: revert unintentional change
      
      * address grumbles
      
      * revert: don't require subscriptions to return Result
      
      * Update core/src/server/helpers.rs
      
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      
      * grumbles: simplify PendingSubscription
      
      * grumbles: fix doc nits
      
      * remove pipe_from_stream APIs again
      
      * add backpressure test for ws server
      
      * rpc module: add `send_timeout` APIs
      
      * rpc module: add tokio/time
      
      * cleanup
      
      * Update examples/Cargo.toml
      
      * Update server/src/server.rs
      
      * Update server/src/server.rs
      
      * Update server/src/server.rs
      
      * extract `build_message` to `SubscriptionMessage`
      
      * remove resource limiting leftover
      
      * Update core/src/server/rpc_module.rs
      
      * Update examples/examples/ws_pubsub_broadcast.rs
      
      * Update examples/examples/ws_pubsub_broadcast.rs
      
      * revert unintentional change
      
      * Update examples/examples/ws_pubsub_with_params.rs
      
      * fix more nits
      
      * improve SubscriptionEmptyErr
      
      * clippy --fix
      
      * bring back subscription limit
      
      * server: `set_message_buffer_capacity`
      
      * rpc module: revert raw_json_request API
      
      * subscribe_bounded -> subscribe
      
      * CallResponse -> CallOrSubscription
      
      ---------
      
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      5faac4f1
  24. Feb 02, 2023
  25. Feb 01, 2023
  26. Jan 31, 2023
    • Niklas Adolfsson's avatar
      client: use tokio channels (#999) · 1a2a1990
      Niklas Adolfsson authored
      * client: use tokio channels
      
      This PR replaces the future channels with tokio because the APIs fit our use-cases better.
      
      * remove unused code
      
      * fix wasm build
      
      * fix docs
      
      * fix tests
      
      * fix more nits
      
      * Update core/src/client/async_client/mod.rs
      
      * Update core/src/client/async_client/mod.rs
      
      * fix unwrap
      1a2a1990
  27. Jan 30, 2023
  28. Jan 26, 2023
  29. Jan 24, 2023
    • MOZGIII's avatar
      Custom errors (#977) · dab1bfc0
      MOZGIII authored
      
      
      * Implement support for custom errors
      
      * Remove unneded for<'a> from E bound
      
      * Fix doctest
      
      * Handle the case where there are not exactly two arguments
      
      * Support for other Result paths
      
      * Rewrite with a more explicit rewriting logic
      
      * Back to rewriting the error argument
      
      * Add UI error for non-result
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * Fix a typo
      
      * Fix errors in the rest of the targets
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      dab1bfc0
  30. Jan 13, 2023
  31. Jan 10, 2023