-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add Attribute Path for Type Validator Diagnostics #127
Labels
enhancement
New feature or request
Comments
bflad
changed the title
Add Attribute Path for Validator Diagnostics
Add Attribute Path for Type Validator Diagnostics
Sep 3, 2021
bflad
added a commit
that referenced
this issue
Sep 3, 2021
This was referenced Sep 3, 2021
bflad
added a commit
that referenced
this issue
Sep 7, 2021
bflad
added a commit
that referenced
this issue
Sep 7, 2021
bflad
added a commit
that referenced
this issue
Sep 7, 2021
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Module version
Pre v0.3.0 with validators support
Use-cases
Diagnostics from
attr.TypeWithValidate
Validate()
methods should have the opportunity to return the attribute path associated with the diagnostic, to ensure the feedback is clear for practitioners and provider developers.Attempted Solutions
Currently diagnostics must must manually re-associate the value as a string or establish a meaningful context in the diagnostic summary/detail.
Proposal
Before releasing v0.3.0, make the breaking change to add
*tftypes.AttributePath
to theattr.TypeWithValidate
interface typeValidate()
method signature:All
Validate()
calling code currently has access to the*tftypes.AttributePath
.Other changes from #24 and #81 may further change this method signature.
References
Found while looking at #53 and #99.
The text was updated successfully, but these errors were encountered: