-
Notifications
You must be signed in to change notification settings - Fork 96
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
attr: Added IsNull()
and IsUnknown()
methods to the Value
interface type
#194
Conversation
…face type Reference: #193
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.
Needs review by @paddycarver but I'm on board with this as you know!
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.
I still think I prefer a tfsdk.ValueIsNull
and tfsdk.ValueIsUnknown
to reimplementing this on every single type.
I think asking type developers to implement the logic themselves creates opportunities for hard to debug situations where the value produces a null/unknown value when converted into a Terraform type, but reports that it is not null.
I also think it's extra work for type developers that doesn't need to be done and is just repeating yourself.
I recall you had some reasons for preferring not to do that. The one that comes to mind is that the tfsdk
package is getting large and unwieldy, which I agree with, but I think can be mitigated by refactoring our package hierarchy.
Can you remind me what the other reasons you brought up were?
Arguments for methods:
|
We decided we wanted to wait on this momentarily until we can tackle #215, #172, and other refactoring issues, and refactor our package boundaries a little. Right now, it's a little hard to understand how large the discoverability tradeoff is going to be, just because we're guessing at what package architectures may be available in the future. I'm still hopeful we'll be able to have an |
I'm going to close this out for now given some other recent/upcoming changes. Can revisit this again in the future, if it makes sense. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Closes #193