Skip to content
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

MooseGroup and Collection API tries to be too clever #722

Closed
NicolasAnquetil opened this issue Feb 5, 2024 · 0 comments
Closed

MooseGroup and Collection API tries to be too clever #722

NicolasAnquetil opened this issue Feb 5, 2024 · 0 comments
Labels
bug Something isn't working Sprint

Comments

@NicolasAnquetil
Copy link
Contributor

MooseGroup tries to be clever to handle the complete API of Collection

This is done by implementing #doesNotUnderstand: and redirecting the message to the internal collection of MooseGroup
(and if this redirection does not work again, then it re-sends the original error)

First I generally think that capturing doesNotUnderstand as "normal behaviour" is not a good idea.
I would prefer that we implement by hand all the methods that we need. It is not difficult, each time something is missing we add the method and delegates it to the inner collection ...

Second, the current #doesNotUnderstand: implementation is buggy, it tries the message on the inner collection and if this raises DNU again, it signal's it without looking what is not understood.
We had a problem here, were #select:thenDo: was sent to a MooseGroup. It was not understood and #doesNotUnderstand: resent it to the inner collection. And this worked.
But then inside the block somewhere down the road, another DBU was raised.
And it was captured and signaled as 'MooseGroup does not understand select:thenDo:' which was completely misleading (the actual problem was that some other method was send to nil).

@NicolasAnquetil NicolasAnquetil added bug Something isn't working Sprint labels Feb 5, 2024
@uNouss uNouss closed this as completed in 96f326c Mar 29, 2024
uNouss added a commit that referenced this issue Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Sprint
Projects
None yet
Development

No branches or pull requests

1 participant