[infer] DefaultDiff
- Make it easy to customize diff behavior without re-implementing diff
#277
Labels
kind/enhancement
Improvements or new features
Hello!
Issue details
When
infer
based resources want to customize theDiff
call, they can implementCustomDiff
. This is great when the author wants full control of Diff's functionality, but it's expensive and bug-prone if the provider author only wants to tweak diff's behavior (example: #113).Check
&CustomCheck
had the same problem, which was solved by theDefaultCheck
function:DefaultCheck
is implemented so that if a resourcer
implementsCustomCheck
withDefaultCheck
, they get the same behavior as not implementingCustomCheck
at all:By allowing custom implementations to wrap the default behavior, provider authors can make arbitrary tweaks to how
Check
works without the need for re-implementing existing behavior.We should bring this same functionality to
Diff
&CustomDiff
.DefaultDiff
should work forinfer.Resource
and infer based provider configuration.Motivated by #113
The text was updated successfully, but these errors were encountered: