-
Notifications
You must be signed in to change notification settings - Fork 698
Fix/bad syntax binding error variants #6343
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
base: develop
Are you sure you want to change the base?
Fix/bad syntax binding error variants #6343
Conversation
… formatting code) to specialize CheckErrors::BadSyntaxBinding. Also, remove tuple-specific bad syntax binding errors since they are now captured by BadSyntaxBinding
…e-bindings, report the specific kind of error instead of the generic BadSyntaxBinding
…type-check a list of (name, value) pairs
…kind of binding being checked so an error will result in a meaningful message
…SyntaxBinding(..)
…ype-check being performed so error messages can reflect it
… to now check for the specific variant of BadSyntaxBinding. Also, add comprehensive checks for each variant of BadSyntaxBinding, as well as test to verify that error messages do not grow unbound with the type's nesting depth
…nding error and the specific context in which it occurs
…uple being checked
…reporting, and consolidate Display implementation for SymbolicExpression and SymbolicExpressionType
…and update tests to expect when BadSyntaxBinding wraps another CheckErrors variant
…g expecting it to wrap an inner CheckErrors variant which lead to a bad binding
…xBindingError::BadTypeSignature(..) ..), instead of BadSyntaxExpectedListOfPairs, so the caller has a better idea about what is structurally deficient about the binding or type signature
…ntax-binding-error-variants
Codecov Report❌ Patch coverage is ❌ Your project check has failed because the head coverage (72.73%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #6343 +/- ##
===========================================
- Coverage 81.00% 72.73% -8.28%
===========================================
Files 541 541
Lines 347855 348261 +406
===========================================
- Hits 281772 253293 -28479
- Misses 66083 94968 +28885
... and 285 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Description
This PR improves the expressiveness of
CheckErrors::BadSyntaxBinding
and some related binding errors to indicate both the kind of binding considered, as well as the specific structural deficiency. Specifically, it differentiates between faulty let-bindings, function definitions, and tuple constructors, and it treats all instance of invalid type signatures found in top-level definitions asCheckErrors::BadSyntaxBinding
while reporting the innerCheckErrors
error message and innermost faulty binding in the signature.For example, in
develop
today, these errors are reported.In this PR, these same errors are as follows:
Right now, this PR does not touch
CheckErrors::BadMayTypeDefinition
, but I'm happy to add that as well.Applicable issues
Additional info (benefits, drawbacks, caveats)
Looking at where the errors were used, it does not appear that any changes are consensus critical. I could not find any place in the codebase where the caller matches on a
CheckErrors
value affected by this PR.Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml