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

Fix diffs involving unit/tuples #5462

Merged
merged 4 commits into from
Nov 22, 2024
Merged

Fix diffs involving unit/tuples #5462

merged 4 commits into from
Nov 22, 2024

Conversation

ChrisPenner
Copy link
Contributor

Overview

The diff calculator was crashing when there was a change like: (blah, 1) -> (blah, ()) because it thought the ) from the () was related to the ending paren, which was just a syntax element and it didn't know how to create a hash-change annotation from the paren that was just a bracket.

Implementation notes

I've solved this case by just re-splitting any confusing cases into old and new chunks, which should fix this and any other cases I may have missed.

Test coverage

Added a regression test for this case.

@ChrisPenner ChrisPenner merged commit d7a1edb into trunk Nov 22, 2024
32 checks passed
@ChrisPenner ChrisPenner deleted the cp/fix-tuple-diffs branch November 22, 2024 19:35
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.

2 participants