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

SpCollectionListModel now (unhelpfully) uses identityIndexOf: instead of indexOf: #1683

Open
ericwinger opened this issue Dec 17, 2024 · 1 comment

Comments

@ericwinger
Copy link

Sometime recently a change occurred between stable versions of Pharo 12 ... SpCollectionListModel>>#indexOf:ifAbsent: changed from using indexOf:ifAbsent: to identityIndexOf:ifAbsent:.

I'm not sure prompted the change but it, at best, isn't helpful because a number of my tests broke when string identity equality was suddenly required. Simple selections like below broke because the strings weren't identical.

self variableListPresenter selections: #( 'format' ).

Finding the problem was daunting. It would be helpful if index lookup in collections was reverted to simple equality comparison.

Comparing methods:
Pharo 12.0.0
Build information: Pharo-12.0.0+SNAPSHOT.build.1523.sha.3fd20c14be4ec63710f40bb8eb486e1eaf262af2 (64 Bit)
image

Pharo 12.0.0
Build information: Pharo-12.0.0+SNAPSHOT.build.1542.sha.bf940cf78c64105fcd27fc961d34c9163e548146 (64 Bit)
image

@demarey
Copy link
Collaborator

demarey commented Dec 17, 2024

Hi @ericwinger
Thank you for the report.
I faced the same problem. It has already been fixed in Pharo 13. I proposed a fix for Pharo 12: see #1681
It is waiting for integration @estebanlm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants