-
Notifications
You must be signed in to change notification settings - Fork 448
Clarify that edits passed to IncrementalParseTransition
are concurrent and add function to transform sequential edits to concurrent
#301
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
Conversation
@swift-ci Please test |
|
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.
We should:
- Make it clear in documentation comments that the edits are considered concurrent
- Make the initializer accept normalized edits with a precondition to check them (or maybe throw an error, though that would change API/ABI)
- Provide the
normalizeEdits()
as helper function but have it accept either concurrent or cumulative edits
4ad6e0d
to
4741d83
Compare
IncrementalParseTransition
are concurrent and add function to transform sequential edits to concurrent
OK, I refactored the PR pretty significantly (although the translation algorithm stayed mostly the same).
I kept the old initializer, made it call through to |
4741d83
to
6a7d732
Compare
6a7d732
to
71351c4
Compare
@swift-ci Please test |
This API isn't used much, a search on GitHub only showed the stress-tester, but having a transitional step is goodness. |
/// 1. not be overlapping. | ||
/// 2. be in increasing source offset order. | ||
public struct ConcurrentEdits { | ||
/// The raw concurrent edits. Are guranteed to satisfy the requirements |
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.
Typo "guranteed"
…ent and add function to transform sequential edits to concurrent To clarify that the edits passed to `IncrementalParseTransition` are applied concurrently, introduce a new `ConcurrentEdit` type that provides the guarantee and allows translation of sequentially applied edits to the expected concurrent form. Fixes rdar://72848263
71351c4
to
a70ff2d
Compare
@swift-ci Please test |
To clarify that the edits passed to
IncrementalParseTransition
are applied concurrently, introduce a newConcurrentEdit
type that provides the guarantee and allows translation of sequentially applied edits to the expected concurrent form.Fixes rdar://72848263