-
-
Notifications
You must be signed in to change notification settings - Fork 33
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: remove suggestions' duplication #286
Conversation
This practically solves the problem of identical suggestions, but how about partial overlaps? Do you have an idea (theoretically) how to deal with multiple overlapping suggestions, at least avoiding corruption? |
Thank you for your reviews! I'm still striving to find a better solution for the case there are multiple mistakes. Could I make sure my understanding is that
means If so, I think we could achieve this by iterating through both resulted collections and merging the overlapped ones based on the fields of Suggestion: origin, span, and range. (Here, in this case, we don't need to use HashSet.) |
The difficulty is overlapping changes that are confliciting, or even if they're not, how to merge them. My idea would be, to omit one of them (the latter one), and re-run on the relevant chunk after applying the first suggestion. |
Thank you for your help! It makes sense!! So, in that case, we need to identify overlapping changes, then apply the suggestion internally on the firstly overlapped one, and re-run the checker on the latter ones. |
Yes, that's precisely it. Sorting might help and then iterating over adjacent tuples, just an idea. I don't have a vision on how the checker would be re-run, though. In a perfect world, without any additional IO. |
Great thanks! Maybe it will take a few days, but I will give it a try. |
Sorry for the slow progress. |
Hey @granddaifuku 👋 - gentle ping in the new year 🎆 - is there anything you're blocked on I could help with? |
Happy new year @drahnr ! Thank you for caring about this!! I'm sorry I couldn't make any progress on this PR due to my thesis. |
Best of luck (which I am sure you don't need) @granddaifuku ! Feel free to ping me once you're done :) |
Gentle ping, now that people are starting to hit issues with this i.e. #295 |
@drahnr |
@drahnr |
Hey @granddaifuku I'll try to find some time later this week :) for a hunch, see #296 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start :) a few stylicstic and domain specific topics to address, regarding the re-running of the checker, it's a non-trivial undertaking and should possibly be deferred to separate PR.
@drahnr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, one fix pending :)
@drahnr |
@drahnr |
@granddaifuku sorry for the long silence, is there anything left to do from your perspective? Did you test it as part of the dummy projects in the working tree? |
@drahnr |
What does this PR accomplish?
Closes #10 .
Changes proposed by this PR:
To remove the duplicated suggestions, the
Vector of Suggestion
is converted once to aHashSet
and then again to aVector
.Notes to reviewer:
This PR tries to resolve the 🔰 part of the issue, but I'm willing to work on further parts of it.
📜 Checklist
./demo
sub directory