Repository navigation
test(editor): queue each TreeSitter edit burst before any of it can parse - #4618
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
test_cancelAllEditsUntilFinalOneandtest_editsDuringSetupsent their burst of edits from the main thread while the executor was free to parse each one the moment it was queued. On a loaded runner the main thread stalls between keystrokes, so an edit's parse committed before the next edit arrived and rightly reported success: "Edit N was not cancelled", then the 5 s timeout for those expectations (fix(core-postgres): read the catalogs of PostgreSQL 10 to 13 #4613, ci(ios): install the simulator runtime when the runner image lacks it #4607, perf(connections): use the idle session for the first listing and read each list once #4575 on CI).applyEditschecks the revision before and at the commit), and a superseded or cancelled one reportsoperationCancelled.executor.execSync, which holds the queue the way a synchronous parse does, so every edit is queued before any of them can parse. What they assert is unchanged: every superseded edit and the setup's highlight query report cancellation, and the last edit succeeds with the combined ranges.Test plan
swift test --filter TreeSitterinapple/Packages/TableProEditor, five runs, all pass.