-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Search and find* deprecations fixes and improvements #26149
Conversation
f850084
to
f48b354
Compare
Looks like we're also missing this deprecation:
|
We don't support looking for a sequence of elements in a collection (except for the special case of strings). |
Ah, ok. I was just reviewing the PR based upon what the diff showed and the behaviors of 0.6 and 0.7 — we have deprecations for |
Ah, indeed. That's just an oversight, I didn't think about it when implementing deprecations for all existing methods. They don't give correct results since they consider the array as an element rather than as a sequence. I've added a commit to remove them. |
b04ffd7
to
d6fde5a
Compare
While I'm at it, I've added a commit to return |
EDIT: Stefan convinced me; I agree that this makes sense. |
The reasoning is that there are patterns (e.g. regular expressions) which can match an empty range, so returning an empty range to indicate "no match" is a poor generic API. |
The current behavior breaks backward compatibility.
We do not provide any replacement for these methods which have never been documented.
…or no match This is more consistent with functions which return a single index. It also allows distinguishing no match from an empty match.
See commit messages.
Fixes #26145.