-
Notifications
You must be signed in to change notification settings - Fork 636
Export errors for easier programmatic use #1140
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
Comments
hey @thanethomson , is it free to pick up? |
It is! Are there particular packages you'd like to tackle, or would you like to handle the whole lot? If you'd like to tackle the issue in its entirety, I'd still recommend submitting separate PRs for each package to make review quicker. |
sounds awesome! not sure if I will be able to tackle the whole thing, but I will go in the sequential order packages are listed in the issue. I will "reserve" |
Thanks @pysel! I'll assign you to this issue for now, given the above. If anyone else wants to take on other packages, please let us know on this thread. |
hey @thanethomson, is it free to pick up 'mempool' package? |
hey @thanethomson! |
Hey @allnil and @4ever9! Feel free to pick up any of the packages from the list in the issue description that don't have PRs associated with them (currently most of them). |
Hey @thanethomson is |
I'm working on |
@thanethomson @melekes Hi sir, It would be better if there was a simple guide for exporting the errors so that successors who are going to pick up other packages could start their coding easily. Such as telling developers if they could adjust the error message, or how to export the errors in some common cases, etc. Also, we should add a simple code rule to CONTRIBUTING.md to ensure that all possible errors returned by publicly exported methods are defined programmatically and publicly exported too. |
This PR Contributes to: #1140 Changes: - Exports errors for rpc package --------- Co-authored-by: Andy Nogueira <me@andynogueira.dev> Co-authored-by: Adi Seredinschi <adizere@gmail.com>
Partially addresses: #1140 Exports errors for `light` package. --------- Co-authored-by: Adi Seredinschi <adizere@gmail.com> Co-authored-by: Daniel <daniel.cason@informal.systems> Co-authored-by: Andy Nogueira <me@andynogueira.dev>
This PR Contributes to: #1140 Changes: - Exports errors for `p2p` package --------- Co-authored-by: Andy Nogueira <me@andynogueira.dev>
<!-- Please add a reference to the issue that this PR addresses and indicate which files are most critical to review. If it fully addresses a particular issue, please include "Closes #XXX" (where "XXX" is the issue number). If this PR is non-trivial/large/complex, please ensure that you have either created an issue that the team's had a chance to respond to, or had some discussion with the team prior to submitting substantial pull requests. The team can be reached via GitHub Discussions or the Cosmos Network Discord server in the #cometbft channel. GitHub Discussions is preferred over Discord as it allows us to keep track of conversations topically. https://github.com/cometbft/cometbft/discussions If the work in this PR is not aligned with the team's current priorities, please be advised that it may take some time before it is merged - especially if it has not yet been discussed with the team. See the project board for the team's current priorities: https://github.com/orgs/cometbft/projects/1 --> Partially addresses #1140 --- #### PR checklist - [x] Tests written/updated - [x] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments - [x] Title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec --------- Co-authored-by: Andy Nogueira <me@andynogueira.dev> Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Partially addresses #1140 --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Comet currently doesn't export many of its errors, which hinders programmatic use (i.e. by consensus engine developers). The only alternative for them is to detect specific errors by their string representations, which is prone to breakage even in patch releases of our software.
We should, package by package, ensure that all possible errors returned by publicly exported methods are defined programmatically (example) and publicly exported too.
Per package (check it off if its errors are already all publicly exported or this is not applicable):
config
libs
privval
state
statesync
store
types
version
Once the packages are implemented:
The text was updated successfully, but these errors were encountered: