- Dec 01, 2021
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
-
- Nov 26, 2021
-
-
Niklas Adolfsson authored
-
- Nov 24, 2021
-
-
David authored
* Bump version –> 0.5 Fix try-build tests * Changelog * Update CHANGELOG.md Co-authored-by: Niklas Adolfsson <[email protected]> * Update CHANGELOG.md Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Nov 21, 2021
-
-
Alexandru Vasile authored
* proc-macros: Fix documentation typo of `rpc_identifier` * proc-macros: Support deprecated methods for rpc client (#564) Calling a deprecated method of the RPC client should warn the user at compile-time. Extract the `#[deprecated]` macro as is while parsing the RpcMethod, and pass through the macro to the RPC client rendering. * tests/ui: Check deprecated method for rpc client (#564) To ensure that the test will fail during compilation, warnings are denied. Check that the deprecate macro will generate warnings just for the methods that are utilized.
-
- Nov 19, 2021
-
-
Niklas Adolfsson authored
* feat: override `method` subscription notif * Arrow syntax for overwrites (#569) * check that unique notifs are used * check that custom sub name is unique * cargo fmt * address grumbles * Update proc-macros/src/rpc_macro.rs * commit added tests * Update proc-macros/src/render_server.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/render_server.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/rpc_macro.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/rpc_macro.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * grumbles * fix long lines * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/rpc_macro.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/render_server.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/render_server.rs Co-authored-by: David <[email protected]> * more grumbles Co-authored-by: Maciej Hirsz <[email protected]> Co-authored-by: David <[email protected]>
-
- Nov 11, 2021
-
-
Maciej Hirsz authored
* Fix some clippy issues * Add an interval to periodically wake the SelectDriver Waker * Apply suggestions from code review Co-authored-by: David <[email protected]> * Naming grumbles Co-authored-by: David <[email protected]>
-
Maciej Hirsz authored
* Array syntax aliases * fmt
-
- Nov 10, 2021
-
-
Maciej Hirsz authored
-
- Nov 03, 2021
-
-
¯\_(ツ)_/¯ authored
* feat(proc_macro): add support for map arguments * feat(proc_macro): formatting * feat(proc_macro): fix issues with Into trait * feat(proc_macro): param_format for methods * feat(proc_macro): improve param_format checking - Addressed @niklasad1 's suggestion to use an Option instead of just defaulting to "array". * feat(proc_macro): apply suggestions, add test case - Use enum for param format. - Extract parsing logic into separate function. - Add ui test. * feat(proc_macro): run cargo fmt * feat(proc_macro): address suggestions * feat(proc_macro): document param_kind argument * feat(proc_macro): consistent spacing Apply @maciejhirsz formatting suggestion. Co-authored-by: Maciej Hirsz <[email protected]> * feat(proc_macro): apply suggestions - make parameter encoding DRY - remove strings from param_kind - return result from parse_param_kind * feat(proc_macro): formatting Co-authored-by: Maciej Hirsz <[email protected]>
-
- 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]>
-
Maciej Hirsz authored
* Document resource limiting * Formatting * More formatting * fmt * Doc comment wording Co-authored-by: David <[email protected]> * Cross-reference docs between servers and utils * Fix grumbles * More elaborate description * Update http-server/Cargo.toml Co-authored-by: Niklas Adolfsson <[email protected]> * Apply suggestions from code review Co-authored-by: David <[email protected]> * Allow for unlimited resources if cap is 0 * fmt * Update ws-server/Cargo.toml Co-authored-by: Niklas Adolfsson <[email protected]> * Clarify 8 resources, 0s in costs/limits, and runtime errors Co-authored-by: David <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Oct 11, 2021
-
-
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
-
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]>
-
- Oct 01, 2021
-
-
Maciej Hirsz authored
* Unbox async futures * fmt * Cleaner proc macro * Remove unnecessary parens around async blocks
-
- Sep 21, 2021
-
-
Niklas Adolfsson authored
-
- 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]>
-
- Sep 11, 2021
-
-
David authored
-
- 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 08, 2021
-
-
Niklas Adolfsson authored
* cleanup * Update ws-server/src/tests.rs * Update http-server/src/tests.rs
-
Niklas Adolfsson authored
* fix(proc macros): generate documentation Fixes #449 * revert proc macro example * add test that docs are generated * use import * address grumbles * make the code less ugly * simplify more * fix grumbles: check ident before parse * more grumbles: filter_map -> filter
-
- Sep 01, 2021
-
-
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]>
-
Niklas Adolfsson authored
* treat empty json as no params when optional * add test with nested array brackets * address grumbles: better tests * Update types/src/v2/params.rs Co-authored-by: David <[email protected]> * introduce RpcParams::sequence_ignore_empty * address grumbles: ignore empty json in RpcParams * Update proc-macros/src/render_server.rs * address grumbles: remove trim in next_inner() * address grumbles: trim_start after params.next() * address more grumbles * [proc macros]: add test for empty array * make proc macro kind of work * add hack to make it work in proc macros * add hack to make it work in proc macros * [] -> * revert cerebral palsy * Update proc-macros/tests/ui/correct/basic.rs * Update proc-macros/tests/ui/correct/basic.rs * address grumbles * improve is_option * add test for core::option::Option 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]>
-
David authored
* Doc tweaks * More tweaks * Move proc macro code out of the "new" folder * fmt * Can't add doc-links to dev-dependencies
-
- 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
-
Maciej Hirsz authored
-
- 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 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
* Only return the crate name when the crate is `jsonrpsee` as well * Sort out the type paths in the macros, this time for real (?) * fmt
-
David authored
* type paths in client macros * Tweak more paths * Helpers as well