- Oct 11, 2021
-
-
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
-
- 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 08, 2021
-
-
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
-
- Jul 12, 2021
-
-
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
-
- 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]>
-