-
Notifications
You must be signed in to change notification settings - Fork 157
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: initial implementation of OpenRPC definitions for methods #4033
Conversation
…c_types.rs > src/rpc/reflect/openrpc_types.rs
…c_types.rs > src/rpc/reflect/jsonrpc_types.rs
….rs > src/rpc/reflect/parser.rs
…s > src/rpc/reflect/util.rs
…c_types.rs > src/rpc/reflect/openrpc_types.rs
… > src/rpc/reflect/mod.rs
Let's have an issue with the context for this PR. What problem does it solve? Why is it needed? What decisions needed to be made? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- In general, should the
reflect
code live in the Forest repository? Could it potentially live elsewhere and be published to crates.io as something others could reuse? - As noted elsewhere, panics are rough. Can they be avoided so that the error can be handled by the caller?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving. That said, I have my doubts regarding the design decision of having panics here. I hope it won't bite us in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good!
I have submitted some comments, mostly regarding docs.
This code is quite hard to read due to the specifics of the problem it's trying to solve, so it would be nice to make sure it's well-documented, so the next time it needs to be touched it wouldn't take as much brain space as it does to review it.
Especially the macros, parser and serde code.
2e63fc8
to
d510fbe
Compare
Summary of changes
crate::rpc::reflect::SelfDescribingRpcModule
creates OpenRPC definitions for methodschain_get_path
uses that structFollow up
#4032
Change checklist