-
Notifications
You must be signed in to change notification settings - Fork 56
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: Validator extension #67
Conversation
From the first glance, the extension is totally fine from the implementation point of view, though I would spend a few moments thinking through the structure (your README features
I totally agree. I feel sorry that you had to do it manually. Nobody should struggle over and over again here!
I also have high hopes for that. I hope we can get to the point where we can have so little code that there is nothing to remove from it. Would you simply use clap, your CLI implementation would fit in a few hundred lines. We should definitely challenge ourselves to reach that state with the available automation (derive macros, generics, etc). |
@FroVolod Please, refactor validators extension to interactive-clap and create a separate branch to compare |
…on errors on response due to missing `runtime_config`)
@volovyk-s Hey, check out this refactored version using the interactive-clap macro: https://github.com/near/near-cli-rs/tree/validator-extension-interactive-clap/extensions/validator/src |
@frol Build fails on my machine
shouldn't rust-toolchain be updated to 1.56.0+? |
@Buckram123 This PR should be closed in favor of #93 |
Validator extension works at this point, but I can not say that I'm happy with the result. Here is the path that I suggest we should follow in the future:
nearcore
near-cli-builder
crate inside of this repo, use it in the core project and validators extension (nowvalidators
extension is a separate project)In general, 5000+ lines of code for an extension with 2 commands is too much. Even after the creation of macros mentioned above, we will not reach the point when users will be able to build new extensions without pain. I hope that a bunch of macros and libraries mentioned in this PR will solve these issues.