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

Update to itertools 0.13 #899

Merged
merged 2 commits into from
May 20, 2024
Merged

Conversation

dburgener
Copy link
Contributor

Switch deprecated group_by() to chunk_by()

The change in name was made because chunk_by() better implies that the function groups consecutive elements (rather than searching through the iterator and funding all matching elements). This raises the question of whether the intention in the original group_by() was correct, since the change was made to avoid subtle bugs around assuming that this grouped all entries rather than consecutive entries. In the two instances we have of this function call, the first one has a comment specifically calling out a desire to do this consecutively. In the second, the iterator was previously sorted by the chunking value, making consecutive equivalent to all, so I believe we are free of this potential bug.

Switch deprecated group_by() to chunk_by()

The change in name was made because chunk_by() better implies that the function groups *consecutive* elements (rather than searching through the iterator and funding *all* matching elements).  This raises the question of whether the intention in the original group_by() was correct, since the change was made to avoid subtle bugs around assuming that this grouped all entries rather than consecutive entries.  In the two instances we have of this function call, the first one has a comment specifically calling out a desire to do this consecutively.  In the second, the iterator was previously sorted by the chunking value, making consecutive equivalent to all, so I believe we are free of this potential bug.
lalrpop/src/lr1/codegen/parse_table.rs Outdated Show resolved Hide resolved
Fix comment typo

Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
@Pat-Lafon Pat-Lafon added this pull request to the merge queue May 20, 2024
Merged via the queue into lalrpop:master with commit fb87149 May 20, 2024
9 checks passed
@dburgener dburgener deleted the itertools-0.13 branch May 24, 2024 14:34
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

3 participants