attr: Consider Dropping context.Context from Value Type() Method #521
Labels
breaking-change
This PR introduces a breaking change or the resolution of this issue may require a breaking change.
tech-debt
Issues tracking technical debt that we're carrying.
Milestone
Module version
Use-cases
attr.Value
in the framework type system must be able to return their associatedattr.Type
. This is handled via theType(context.Context) attr.Type
method today. While the appropriatecontext.Context
is generally available, there are places where it may not be, such astypes
package value creation functions.Attempted Solutions
Either adding
context.Context
to all potential callers that may eventually callType()
or working around it via:Proposal
Type information should be very static and not require special logic where the
context.Context
is especially helpful (e.g. logging). Therefore, we may be able to drop the parameter to remove this awkwardness.References
The text was updated successfully, but these errors were encountered: