-
Notifications
You must be signed in to change notification settings - Fork 664
Fix #1633 – feat(array wrapper): return ErrorWrapper when index not found with .at() #1634
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
Fix #1633 – feat(array wrapper): return ErrorWrapper when index not found with .at() #1634
Conversation
Hm, this is probably a breaking change. What do we do at the moment? Just undefined? Is there a strong reason for this breaking change? |
Hi @lmiller1990 and thanks for your kind reply. Yes, I think you're correct that it is a breaking change. My mistake not to have linked explicitly the Issue where I develop the case with the compelling (at least to me 😂) reasons for wanting that. Please, have a look here and feel free to ping me for any doubt or question! |
I see. The issue says "The API of at() would not change, instead its internal implementation would". Actually, I think this is a change in the public API (behavior is different). This is probably a sensible change to make though. I have no idea if/how many people rely on this existing behavior. I would like some more opinions (extremely hard to get those, though). @afontcu @cexbrayat any opinion? In VTU v2, we don't even have |
This definitely looks like a (small) breaking change, and even though it makes sense, I'm not 100% it is worth the hassle 🤔 Could we make it opt-in through a config parameter? Call the option |
Thanks again for the reply @lmiller1990. v1
The current signature of We might have two alternatives,
I'd be happy to update the relevant issue and the MR if we find an agreement. v2 and
|
Thanks for the feedback @afontcu! I just edited my reply which contains also some alternative proposals. I like yours as well, so I'm gonna add it to the list. |
I am not a fan of an API like If I had to choose I would go with an additive feature, suggested above... that said, the concept of WrapperArray doesn't exist in V2 (yet, and I don't think it should for the reasons outlined above) so I am not sure there is any real merit introducing it here for a small number of codebases that would benefit from it. Not going to lie, I do feel a little bad to turn down a feature request that is so well thought about and delivered, but it's really hard to justify any kind of breaking change when the rest of the core libs have been so stable for so long, and with Vue 3 coming out, I don't expect people will want to deal with any kind of break change at this point. On the flip side, if you feel strongly about something, now is the time to get in done in V2, before we move to a release candidate! |
@lmiller1990 thanks so much for the answer again 🎉 I see your point and there's no problem in turning down the feature – I understand the concerns. Gonna close this one. |
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
(probabaly?)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch.fix #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information: