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

Let #[] create single-item dependencies if possible #1613

Merged
merged 4 commits into from Nov 5, 2022

Conversation

denisdefreyne
Copy link
Member

@denisdefreyne denisdefreyne commented Nov 5, 2022

Detailed description

This changes @items[] so that if there is a single exact match, no dependency on the item collection is created.

(Same for layouts.)

See source comments for details.

This PR can be a bit tough to review, but you can look through the commits individually. The first commit is the actual change of letting #[] not create dependencies on the item/laout collection, while the second commit removes IdentifiableCollection#[], which is no longer needed and probably should not be used anyway.

To do

  • Add tests for IdentifiableCollection’s #object_matching_glob and #object_with_identifier methods (since #[] is gone).

Related issues

Fixes, hopefully, #1605.

@denisdefreyne denisdefreyne force-pushed the denis/optimize-single-item-dependencies branch from a644e4b to 5a0f2cd Compare November 5, 2022 15:03
@denisdefreyne denisdefreyne force-pushed the denis/optimize-single-item-dependencies branch from 5a0f2cd to 2ce0f04 Compare November 5, 2022 15:04
@denisdefreyne denisdefreyne force-pushed the denis/optimize-single-item-dependencies branch from 2ce0f04 to 7bd3b4a Compare November 5, 2022 15:07
@denisdefreyne denisdefreyne marked this pull request as ready for review November 5, 2022 15:15
@denisdefreyne denisdefreyne merged commit 7ace022 into main Nov 5, 2022
@denisdefreyne denisdefreyne deleted the denis/optimize-single-item-dependencies branch November 5, 2022 20:59
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

Successfully merging this pull request may close these issues.

None yet

1 participant