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

AST-diffing for text edits #8238

Closed
Tracked by #8745
kazcw opened this issue Nov 7, 2023 · 14 comments · Fixed by #9055
Closed
Tracked by #8745

AST-diffing for text edits #8238

kazcw opened this issue Nov 7, 2023 · 14 comments · Fixed by #9055
Assignees
Labels
-gui d-hard Difficulty: significant prior knowledge required p-medium Should be completed in the next few sprints s-research-needed Status: the task will require heavy research to complete
Milestone

Comments

@kazcw
Copy link
Contributor

kazcw commented Nov 7, 2023

Design/implement diff algorithm for preserving AST node identities when source code is edited as text. Depends on #8236, then #8237 should be implemented first.

@kazcw kazcw self-assigned this Nov 7, 2023
@github-project-automation github-project-automation bot moved this to ❓New in Issues Board Nov 7, 2023
@farmaazon farmaazon added d-hard Difficulty: significant prior knowledge required p-medium Should be completed in the next few sprints s-research-needed Status: the task will require heavy research to complete labels Nov 8, 2023
@farmaazon farmaazon moved this from ❓New to 📤 Backlog in Issues Board Nov 8, 2023
@kazcw kazcw moved this from 📤 Backlog to 🔧 Implementation in Issues Board Feb 2, 2024
@enso-bot
Copy link

enso-bot bot commented Feb 2, 2024

Keziah Wesley reports a new STANDUP for today (2024-02-01):

Progress: Implemented the bottom-up part of the text sync algorithm. It should be finished by 2024-02-07.

Next Day: Next day I will be working on the #8238 task. Connect CM edits to the graph store via new text/AST sync.

@enso-bot
Copy link

enso-bot bot commented Feb 3, 2024

Keziah Wesley reports a new STANDUP for today (2024-02-02):

Progress: Introduced a replacement for reactive modules to fix a glitch affecting the new text operations. It should be finished by 2024-02-07.

Next Day: Next day I will be working on the #8238 task. Enable CodeMirror edits.

@farmaazon farmaazon mentioned this issue Feb 5, 2024
mergify bot pushed a commit that referenced this issue Feb 6, 2024
Changes in preparation for #8238 features.

# Important Notes
Changed edit APIs:
- **`graph.astModule` is deprecated.** It will be removed in my next PR.
- Prefer `graph.edit` to start and commit an edit.
- Use `graph.startEdit` / `graph.commitEdit` if the edit can't be confined to one scope.
mergify bot pushed a commit that referenced this issue Feb 6, 2024
Introduce `SourceDocument`, a reactive source code representation that can be synced from a `MutableModule`. `SourceDocument` replaces various logic for tracking source code and spans--most importantly, `ReactiveModule`. There is no longer any reactively-tracked `Module`, per-se: Changes to the `MutableModule` attached to the synchronized `ydoc` are pushed as Y.Js events to the `SourceDocument` and `GraphDb`, which are reactively tracked. This avoids a problem in the upcoming text-synchronization (next PR) that was caused by a reactive back channel bypassing the `GraphDb` and resulting in observation of inconsistent states.

Stacked on #8956. Part of #8238.
@enso-bot
Copy link

enso-bot bot commented Feb 7, 2024

Keziah Wesley reports a new STANDUP for yesterday (2024-02-05):

Progress: Fixed syncToText edge cases. Fixed CodeMirror view stability. It should be finished by 2024-02-07.

Next Day: Next day I will be working on the #8238 task. Look at focus problems.

@enso-bot
Copy link

enso-bot bot commented Feb 7, 2024

Keziah Wesley reports a new STANDUP for today (2024-02-06):

Progress: Fixed focus issues. Fixed diagnostics range exceptions. Added backpressure to batch rapid CodeEditor updates. CodeEditor is now usable. It should be finished by 2024-02-07.

Next Day: Next day I will be working on the #8238 task. Add span-based sync scope reduction for edit-node identity stability and better performance.

@AdRiley AdRiley added this to the Beta Release milestone Feb 8, 2024
@enso-bot
Copy link

enso-bot bot commented Feb 9, 2024

Keziah Wesley reports a new STANDUP for yesterday (2024-02-07):

Progress: Debugged scrollbar focus issue. Working on edited-node stability. It should be finished by 2024-02-07.

Next Day: Next day I will be working on the #8238 task. Finish edited-node stability.

@enso-bot
Copy link

enso-bot bot commented Feb 10, 2024

Keziah Wesley reports a new 🔴 DELAY for yesterday (2024-02-08):

Summary: There is 2 days delay in implementation of the AST-diffing for text edits (#8238) task.
It will cause 0 days delay for the delivery of this weekly plan.

Delay Cause: Issue includes redesigning a complex GUI1 algorithm, fixing a lot of UI issues in the Code Editor setup, and AST support for the new code-edits algorithm.

Possible solutions: I've been delivering the implementation in incremental PRs.

@enso-bot
Copy link

enso-bot bot commented Feb 10, 2024

Keziah Wesley reports a new STANDUP for yesterday (2024-02-08):

Progress: Working on using text-edit inputs to narrow the scope of AST changes. It should be finished by 2024-02-09.

Next Day: Next day I will be working on the #8238 task. Finish code editor PR.

@kazcw kazcw mentioned this issue Feb 12, 2024
5 tasks
@enso-bot
Copy link

enso-bot bot commented Feb 13, 2024

Keziah Wesley reports a new STANDUP for the provided date (2024-02-09):

Progress: Debugging focus/cursor issue. It should be finished by 2024-02-09.

Next Day: Next day I will be working on the #8238 task. Finish code editor PR.

@enso-bot
Copy link

enso-bot bot commented Feb 13, 2024

Keziah Wesley reports a new 🔴 DELAY for yesterday (2024-02-12):

Summary: There is 5 days delay in implementation of the AST-diffing for text edits (#8238) task.
It will cause 0 days delay for the delivery of this weekly plan.

Delay Cause: Debugging many problems with our current CodeMirror integration besides implementing the new text sync algorithm.

@enso-bot
Copy link

enso-bot bot commented Feb 13, 2024

Keziah Wesley reports a new STANDUP for yesterday (2024-02-12):

Progress: Found a problem with current linter invalidation and fixed it. Prepared a PR implementing the bulk of the changes so far, before the smaller but more complex PR for the new text-edits algorithm. It should be finished by 2024-02-14.

Next Day: Next day I will be working on the #8238 task. Debug remaining UI issue, and PR new text-edits algorithm.

@enso-bot
Copy link

enso-bot bot commented Feb 14, 2024

Keziah Wesley reports a new STANDUP for today (2024-02-13):

Progress: Fixed the blocker CodeMirror-integration bug. Refactored and documented new algorithm, wrote tests, and finished PR. It should be finished by 2024-02-13.

Next Day: Next day I will be working on the #8139 task. Start work on edge layering.

@kazcw kazcw linked a pull request Feb 14, 2024 that will close this issue
5 tasks
@enso-bot enso-bot bot mentioned this issue Feb 15, 2024
2 tasks
@enso-bot
Copy link

enso-bot bot commented Feb 16, 2024

Keziah Wesley reports a new 🔴 DELAY for today (2024-02-15):

Summary: There is 3 days delay in implementation of the AST-diffing for text edits (#8238) task.
It will cause 0 days delay for the delivery of this weekly plan.

Delay Cause: Review lag.

Possible solutions: None needed. Worked on another issue in the meantime.

@enso-bot
Copy link

enso-bot bot commented Feb 16, 2024

Keziah Wesley reports a new STANDUP for today (2024-02-15):

Progress: Implemented review changes for code editor. It should be finished by 2024-02-16.

Next Day: Next day I will be working on the #8238 task. Probably more review

@kazcw kazcw moved this from 🔧 Implementation to 👁️ Code review in Issues Board Feb 19, 2024
@enso-bot
Copy link

enso-bot bot commented Feb 19, 2024

Keziah Wesley reports a new STANDUP for the last Friday (2024-02-16):

Progress: Fixed remaining identity-stability issues discovered in testing (mostly caused by false write conflicts). It should be finished by 2024-02-16.

Next Day: Next day I will be working on the #8238 task. Start next issue.

@mergify mergify bot closed this as completed in #9055 Feb 19, 2024
@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Feb 19, 2024
@farmaazon farmaazon moved this from 🟢 Accepted to 🗄️ Archived in Issues Board Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-gui d-hard Difficulty: significant prior knowledge required p-medium Should be completed in the next few sprints s-research-needed Status: the task will require heavy research to complete
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants