You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arity::lookupFeature (thus Record::lookupFeature) uses binary search to find a feature. This requires the features to be totally ordered. But buildArity() won't check if the features are sorted. This causes strange "illegal field selection" errors when developers are unaware of such caveat.
I don't think it's possible for buildArity() to sort the features, because it needs to be matched with buildRecord(). But we could at least add some warning in the doc? Or maybe add an is_sorted() check in debug mode.
The text was updated successfully, but these errors were encountered:
Ah indeed, buildArity() was designed to receive the features in the correct order. It should certainly at least be documented. Maybe a check in debug mode would be a good idea, too.
Arity::lookupFeature
(thusRecord::lookupFeature
) uses binary search to find a feature. This requires the features to be totally ordered. ButbuildArity()
won't check if the features are sorted. This causes strange "illegal field selection" errors when developers are unaware of such caveat.I don't think it's possible for
buildArity()
to sort the features, because it needs to be matched withbuildRecord()
. But we could at least add some warning in the doc? Or maybe add anis_sorted()
check in debug mode.The text was updated successfully, but these errors were encountered: