change(web): remove computeAlignment and older transform-tokenization methods 🚂 #14882
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For all removed methods, note that they did not properly support cases adjacent to 'split' / 'merge' edits. New pathways heavily supporting the same functionality in a more future-forward manner were added in the following PRs:
.insertstrings on the retokenized contextcomputeAlignmentandtokenizeTransformin one, partly through use of helpers in PRs listed aboveWhile handy, especially while transitioning to the new context-management pattern, the
computeAlignmentmethod (refactored during epic/autocorrect, #14430 and relocated in #14573) did not adequately account for 'split' / 'merge' edit cases and also required special handling to avoid certain degenerate edit-path cases. The newer method put in place (by #14874) addresses both issues at once and looks to provide a more robust way forward while also optimizing the range of context that is retokenized for each potential correction, as well as the number of retokenization calls needed per correction.Relevant unit-test cases have largely been migrated and found new homes within the test suites for methods added in the PRs above. It wouldn't hurt to review the cases and ensure this holds true, though. (I personally should take an extra pass through them before undrafting this PR.)
Build-bot: skip build:web
Test-bot: skip