-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Based on feedback from @eiriktsarpalis.
ImmutableEquatableArray<T>
implements sequence equality. The JSON generator uses it in its specs to make incremental generation possible. However, spec collections often need to have set-like semantics to retain equality & avoid regeneration when there are compilation diffs that don't affect the effective inputs to the generator. IOW we want to avoid false negatives in the incremental cache.
An upcoming PR to enable incremental generation for the config binding generator (#83534) will share this type. As a follow up to that PR, we should create a new type (say ImmutableEquatableSet<T>
) that guarantees set semantics by construction, following the implementation of SortedList<T>
. This would avoid false negatives in the incremental cache.