- Nov 01, 2021
-
-
Niklas Adolfsson authored
* reproduce Kian's issue * fix ws server wait until batches has completed * fix nit * clippify * enable benches for ws batch requests * use stream instead of futures::join_all * clippify * address grumbles: better assert
-
- Oct 17, 2021
-
-
Niklas Adolfsson authored
* fix http client bench with request limit * benches for jsonrpc servers * workaround; dont use max request limit * add subscriptions * revert unintentional change * ignore batch request bench for ws * fmt * log -> tracing * test bench CI * test bench v0.3 * wtf; run CI * work plz * remove test CI bench * fix compile warn on macos
-
- Oct 15, 2021
-
-
Niklas Adolfsson authored
-
Maciej Hirsz authored
* Re-introduce object param parsing * fmt and unnecessary collect
-
Maciej Hirsz authored
* register_blocking_method * Support `blocking` flag in `#[method]` * Macro support and tests * MacOS CI fails if there are too many blocking tasks * conn_id is never used in async callbacks * Dry-run blocking callbacks to maybe satisfy MacOS CI * Make tokio optional behind server feature flag * Document `blocking` flag use in `#[method]` * Comment why the test is disabled on mac * Fix warnings on macos tests
-
- Oct 12, 2021
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
* update CHANGELOG * bump version number * fix nit * Update CHANGELOG.md Co-authored-by: David <[email protected]> * bullet list in CHANGELOG * add last item to CHANGELOG Co-authored-by: David <[email protected]>
-
- Oct 11, 2021
-
-
Niklas Adolfsson authored
* [ws server]: refactor start() * remove needless clone * fix http server too * fmt * unify stop APIs * fix bad merge * add API to use custom tokio runtime * use futures oneshot * fix unintentional change * Revert "use futures oneshot" This reverts commit 0432f6ba41d49a3494943458657a31f8afd79160. * Update http-server/src/server.rs Co-authored-by: Maciej Hirsz <[email protected]> Co-authored-by: Maciej Hirsz <[email protected]>
-
Maciej Hirsz authored
* Remove unused import * Add a simple test for angle braces in arguments * Argument parsing should permit commas inside angle brackets * Add a comment, move test to trybuild
-
David authored
-
Niklas Adolfsson authored
* fix(ParamsSer): serialize to empty array Serialize `ParamsSer::NoParams` to an empty array inorder to comply with the jsonrpc v2 spec. * fix tests * remove ParamsSer::NoParams * address grumbles: adjust rpc params macro
-
Maciej Hirsz authored
* Squash post merge * RAII claims and some comments * Adding resources to Methods * Use arrays for claiming all resources at once * Register resources on ws-server * Return MethodResourcesBuilder from register_method * Return MethodResourcesBuilder from register_async_method * fmt and comments * Add `verify_and_insert` to get rid of `or_insert` in order to get mut ref to value * Resources initialization * No need for ResourceBuilder * Comment all the things * Handle errors on ws-server `start` method * Passing ResourceGuard to method execution * Start ws-server in background, simplify all the tests! * Claiming resources on runtime * Do checked math on resource claiming * Clearer error path for resources at limit * Resource limiting tests WIP * Unbox async futures * fmt * Cleaner proc macro * Fix lifetime issues with ResourceGuard with internal Arc * Remove unnecessary lifetime generic * Working tests * Use turbofish in tests * fmt * Fixed (?) benches * Apply suggestions from code review Co-authored-by: David <[email protected]> * Tweak more grumbles * Adding a test for resource limiting with proc macros (WIP) * Reworking attribute macros for resource limiting (#507) * Squashed macros WIP * bae-less macros! * Make things simpler and more readable * Some comments and DRY aliases parsing * Naming things is hard * Respan is no longer needed * Simpler Arguments * Remove stale code * Apply suggestions from code review Co-authored-by: Niklas Adolfsson <[email protected]> * syn-up all the things, handle resources on methods Co-authored-by: Niklas Adolfsson <[email protected]> * Resource limiting on the http server * Test two resources at once * Test the HTTP server for resource limiting * Apply suggestions from code review Co-authored-by: David <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]> * Comment tweaks * More explicit error type for `AttributeMeta::retain` * Remove generic from ResourceTable; derive Default on ws Builder * Make the macros shorter Co-authored-by: David <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Sep 30, 2021
- Sep 24, 2021
-
-
Niklas Adolfsson authored
* fix: server should not send to closed subscription Closing #481 * add a test * rewrite me * remove faulty server close * fix tests * fix tests * remove needless code * Update ws-client/src/client.rs * fix: remove atomic flag; use `close_sender` * remove terminate message; use close channel * remove faulty subscription closed error msg * fix tests * fix grumbles * fix build
-
Squirrel authored
-
- Sep 16, 2021
- Sep 15, 2021
-
-
David authored
* Renames * More renames * fmt * s/RpcParams/Params/ * Add a type alias `SubscriptionResponse` to `Notification` which is parametrized to `SubscriptionPayload` Move `SubscriptionResponse` to the `response` module * Fix doc links * Cleanup and some docs * Review feedback * cleanup
-
- Sep 14, 2021
-
-
David authored
* Add a test illustrating how to use the `call` convenience method * Extend test + review feedback * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * Add Methods::test_subscription Log more when params parsing fails * Add call_with test helper (ty @niklas!) + cleanup * Remove todo (part of https://github.com/paritytech/jsonrpsee/issues/457 ) * fmt * Let `test_subscription` be called from other crates * Manually fix indentation * fmt * SSself-review grumbles * CallError::InvalidParams carries an anyhow::Error * fmt * Tweak docs * Update utils/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <[email protected]> * review grumble * Fix todos * fmt * Fixup error messages * Include source in the error message for `CallError` * fmt * Update proc-macros/src/render_server.rs Co-authored-by: Maciej Hirsz <[email protected]> * Mention needing jsonrpsee crate in scope * Resolve todo * Impl ToRpcParams for 0-sized array * optimized logging Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Maciej Hirsz <[email protected]>
-
Maciej Hirsz authored
* Reject overflowing connection with status code 429 * fmt * rename Handshake -> HandshakeMode for clarity; verbose test * Gracefully shutdown after rejecting to hopefully fix the errors on windows * HandshakeMode -> HandshakeResponse; tweak pending subscriptions on shutdown test
-
- Sep 09, 2021
-
-
Niklas Adolfsson authored
Similar to #435 that adds the same restrictions to subscriptions too. To avoid having faulty trait bounds on when the subcription actually returns Result.
-
- Sep 01, 2021
-
-
Maciej Hirsz authored
* Experimental generic driver for methods * Move FutureDriver to its own module * "Infallible" sync methods + fmt * Drive all methods to completion before background_task closes * Testing a different stop handle * Added the waker for the monitors * Fix the test * Fix a possible deadlock * fmt * Explain strong_count check in StopHandle Drop impl * Clippy tweak Co-authored-by: Niklas Adolfsson <[email protected]> * Added comment on atomicbool ordering Co-authored-by: Niklas Adolfsson <[email protected]>
-
Niklas Adolfsson authored
* feat: alias attribute for proc macros * implement David's suggested no more unsub field * keep aliases outside namespace * revert example * fix build * Update proc-macros/src/attributes.rs Co-authored-by: David <[email protected]> * grumbles: alias -> aliases * grumbles v2: alias -> aliases Co-authored-by: David <[email protected]>
-
- Aug 27, 2021
-
-
Niklas Adolfsson authored
* PoC support generic type params * more annoying example * add trait bounds for generic params in proc macros * add compile-time test for complicated trait * smarter trait bounds in proc macros * add non-working example for now * revert nits * Update examples/proc_macro.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/helpers.rs Co-authored-by: David <[email protected]> * add messy code but works * cleanup * add some simple compile check in tests * fix doc link * fix doc link last time * address grumbles * docs * Update proc-macros/src/helpers.rs * Update proc-macros/src/helpers.rs * Update proc-macros/src/helpers.rs * Update proc-macros/src/helpers.rs * Update proc-macros/src/visitor.rs * fix nit: | -> || * Update proc-macros/src/helpers.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/helpers.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/helpers.rs Co-authored-by: David <[email protected]> * add issues to introduced TODOs * generics support where clause on trait * Update proc-macros/src/helpers.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/helpers.rs * address grumbles * add more docs Co-authored-by: David <[email protected]>
-
- Aug 25, 2021
-
-
David authored
* Add license headers where missing and update year * Update examples/http.rs Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Aug 18, 2021
-
-
Niklas Adolfsson authored
* rewrite me * require proc macro API to return result * send unknown message when error is not CallError * show example that auto cast StdError doesn't work * register_*_method Into<Error> * clippy * replace generic errors with anyhow::Error * fix nits * example that anyhow::Error in register_method works * CallError: add missing From impl * [types]: add helper methods for Error types The rationale is to make it possible for users to either use anyhow::Error or use the helper methods. * fmt * Revert "register_*_method Into<Error>" This reverts commit 33b4fa28730b72647ba150659d3c0ab1937e524a. * add better comment * fix nit
-
- Aug 13, 2021
-
-
Niklas Adolfsson authored
* fix: update example to new proc macros * remove unused code * remove client builder
-
- Jul 27, 2021
-
-
Maciej Hirsz authored
* WIP * Feature-complete-ish * WIP * Cleaner replace marker * Inject lifetimes in elided `Cow`s * Use a single static &str for all injected lifetimes * Working lifetimes * Add the `call` method to `Methods` * Testing proc macro with optional params * Remove internal loop * fmt * Fix grumbles
-
- Jul 15, 2021
-
-
dependabot[bot] authored
Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger) to permit the latest version. - [Release notes](https://github.com/env-logger-rs/env_logger/releases) - [Changelog](https://github.com/env-logger-rs/env_logger/blob/main/CHANGELOG.md) - [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.8.0...v0.9.0 ) --- updated-dependencies: - dependency-name: env_logger dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
- Jul 12, 2021
-
-
Maciej Hirsz authored
* Do not register methods on servers * fmt * Infallible `to_rpc` proc macro * Remove dead code * Check for duplicate names at compile time * Add a UI test for name conflicts * Apply suggestions from code review Co-authored-by: David <[email protected]> Co-authored-by: David Palm <[email protected]>
-
David authored
* Include "macros" in the "server" feature * Re-export SubscriptionSink * Include the "types" feature in both the "client" and "server" features Export types::* from façade when the "types" is active Export types::* from servers * fmt * Export jsonrpsee_types under types * fmt * broken doc link * fix benches * fmt * Fix test imports
- Jul 01, 2021
-
-
Igor Aleksanov authored
* Start working on the new proc macro system * Add skeleton for rendering * Improve error reporting * Main part of 'render_client' * Implement RPC client generation * Client successfully rendered * Add doc-comment generation for the API client * Check that all the methods have receiver * Start working on the server impl * Add helper method to find server crate * Fix usage of client rpc path * Decent progress on the server macro implementation * Server macro compiled successfully * Remove unneeded re-export * Insert SubscriptionSink argument to the subscription server signatures * Add basic doc-comment for the macro * no_run -> ignore * Trait with subscription compiles * Extend the example * Add integration test for client/server impl * Add trybuild setup * Set correct span for attribute parsing related errors * Add basic set of trybuild tests * Add tests for client and server generated separately * Improve proc-macro documentation * Update proc-macros/src/lib.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Fix a couple of bugs in docs * Fix rendering subscription with params Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Jun 30, 2021
-
-
Niklas Adolfsson authored
* [ws server]: terminate connection when closed. * fix tests * add test * address grumbles: return Ok when server stopped * revert log * revert outdated documentation * use wrapping add for conn id * address grumbles: replace Mutex with AtomicBool * add comment to assertion * fix nits * address grumbles: naming of variables * address grumbles: RwLock to wait for tasks This commit introduces a RwLock instead of the Mutex to the shared by the background tasks and the stop handle won't signal until all readers has been dropped. * fix nit * Update ws-server/src/server.rs * remove AtomicBool; use stop_sender instead * Update ws-server/src/server.rs * Update ws-server/src/server.rs Co-authored-by: David <[email protected]> * correct subscription err messages Co-authored-by: David <[email protected]>
-
- Jun 24, 2021
-
-
Niklas Adolfsson authored
* [jsonrpsee types]: unify types + more tests * address grumbles
-
- Jun 04, 2021
-
-
Niklas Adolfsson authored
* [rpc module]: server-side close subscription Add functionality that closes the subscription after the sink has been dropped. * [integration tests]: add timeout on futures * remove global subscriber mutex * fix nit * [client types]: fix #349 Subscription::next() propogate error when parsing the response fails * [client types]: fix #349 Subscription::next() propogate error when parsing the response fails * unify subscription and notification * rename again * send notif response when subscription is dropped * stray debug stuff * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Revert "[client types]: fix #349" This reverts commit c4fefade719ebd8c964a62d0eb16f89db3346ccd. * Revert "[integration tests]: add timeout on futures" This reverts commit 21dfb99649aaaa8c847a693b4510e0202498fa2c. * show that actual edge-case * fix nit * Update types/src/traits.rs * fix bad merge * ugly; but works * complete solution * get rid of Option * Update tests/tests/integration_tests.rs * Update utils/src/server/rpc_module.rs * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * grumbles: fix faulty early return * remove weird abstraction KeepAlive * fix nits * revert test timeouts * address grumbles * fix build Co-authored-by: David <[email protected]>
-
- Jun 03, 2021
-
-
Niklas Adolfsson authored
* [client types]: fix #349 Subscription::next() propogate error when parsing the response fails * unify subscription and notification * rename again * Update types/src/traits.rs * fix bad merge * Update types/src/client.rs Co-authored-by: David <[email protected]> * grumbles: subscribe_method -> subscribe_to_method * Update tests/tests/integration_tests.rs Co-authored-by: David <[email protected]> * grumbles: doc links Co-authored-by: David <[email protected]>
-
David authored
* Add a builder to the ws server * Use the WsServerBuilder in tests&examples * cleanup * fmt * Fix benches * fix error message * Add connection count limiting and associated config item * Use the strong_count to `methods` to know how many connections we currently have * Fix test
-
Igor Aleksanov authored
* Stick test code to a single runtime * Replace async-std in ws-client with tokio * Replace std::thread::sleep with tokio::time::sleep in test * Add compatibility layer for tokio v0.2 * Add check for both features being enabled + some improvements * Update ws-client/src/tokio.rs Co-authored-by: Niklas Adolfsson <[email protected]>
-