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

Remove expression UUIDs from metadata section of a source file #10182

Closed
5 tasks
Tracked by #9257
4e6 opened this issue Jun 5, 2024 · 7 comments · Fixed by #10283
Closed
5 tasks
Tracked by #9257

Remove expression UUIDs from metadata section of a source file #10182

4e6 opened this issue Jun 5, 2024 · 7 comments · Fixed by #10283

Comments

@4e6
Copy link
Contributor

4e6 commented Jun 5, 2024

Goal

This ticket describes the second part of #9257 tasks. The metadata section currently contains two types of information:

  • node metadata like position, color, and/or widget metadata
  • identification of expressions (and nodes) for communication with the engine via the LS protocol

The goal of this issue is to deal only with UUIDs of expressions where persistence isn't needed. The goal isn't to remove the whole META-DATA concept, but make the section significantly smaller.

Current Situation

The rumor has it that for a less than hundred lines .enso file the size of META-DATA section can grow significantly over 100KB - mostly because of storing UUIDs for all the expressions in the program, not just UUIDs for operatorXyz assignments.

The Plan

To quote 9257 comment:

Once #7954 is implemented ... then the Y.js based AST is hosted in the same process as the engine ... when there is an AST change that modifies the source code we traverse the AST and recompute ranges (offset, line, column) of expressions and nodes that _have an UUIDs attribute in the AST. A change in the source code always comes with new ranges. All of that is done synchronously, keeping UUIDs and their spans in sync.

Tasks

Preview Give feedback

TL;DR

  • use dynamic UUID range information where persistence is not needed
  • keep persistent information (where visualization is attached, what is the type of expression, etc.) in the META-DATA section as so far
@4e6 4e6 self-assigned this Jun 5, 2024
@github-project-automation github-project-automation bot moved this to ❓New in Issues Board Jun 5, 2024
@4e6 4e6 moved this from ❓New to 📤 Backlog in Issues Board Jun 5, 2024
@JaroslavTulach JaroslavTulach changed the title Remove Identifiers section of Metadata from source file Remove _expression UUIDs_ from metadata section of a source file Jun 5, 2024
@JaroslavTulach JaroslavTulach changed the title Remove _expression UUIDs_ from metadata section of a source file Remove expression UUIDs from metadata section of a source file Jun 5, 2024
@4e6 4e6 moved this from 📤 Backlog to 🔧 Implementation in Issues Board Jun 6, 2024
@enso-bot
Copy link

enso-bot bot commented Jun 6, 2024

Dmitry Bushev reports a new STANDUP for today (2024-06-06):

Progress: Started working on the task. A call with the gui team to discuss the plan for removing the IdMap. Started working on updating the Language Server API. Added an optional IdMap parameter to the textEdit message. Fixed an issue with refactor/renameProject request to support arbitrary project names. It should be finished by 2024-06-14.

Next Day: Next day I will be working on the #10182 task. Continue working on the task

@enso-bot
Copy link

enso-bot bot commented Jun 7, 2024

Dmitry Bushev reports a new STANDUP for today (2024-06-07):

Progress: Continue working on the task. Updated Docker image adding a ydoc port argument for customization in the Cloud environment. Updated the language server API text/applyEdit method. Started updating the parser logic by resolving external ids in locations. It should be finished by 2024-06-14.

Next Day: Next day I will be working on the #10182 task. Continue working on the task

@4e6 4e6 added x-on-hold and removed x-on-hold labels Jun 10, 2024
@enso-bot
Copy link

enso-bot bot commented Jun 10, 2024

Dmitry Bushev reports a new STANDUP for today (2024-06-10):

Progress: Continue working on the task. Updated the textEdit request handling logic to propagate the IdMap. Updated the interactive compilation logic to handle the IdMap. Implemented the JSON serialization of IdMap. It should be finished by 2024-06-14.

Next Day: Next day I will be working on the #10182 task. Continue working on the task

@enso-bot
Copy link

enso-bot bot commented Jun 12, 2024

Dmitry Bushev reports a new STANDUP for yesterday (2024-06-11):

Progress: Continue working on the task. Added backward-compatible JSON serialization for IdMap. Added JSON-RPC language server test. Fixed issue with Jsoniter serialization of IdMap It should be finished by 2024-06-14.

Next Day: Next day I will be working on the #10182 task. Continue working on the task

@4e6 4e6 mentioned this issue Jun 13, 2024
3 tasks
@enso-bot
Copy link

enso-bot bot commented Jun 13, 2024

Dmitry Bushev reports a new STANDUP for yesterday (2024-06-12):

Progress: Continue working on the task. Added runtime test checking the IdMap propagation. Trying to fix the mapExpressions method of IR to make it useable with IdMap propagation. It should be finished by 2024-06-14.

Next Day: Next day I will be working on the #10182 task. Continue working on the task

@enso-bot
Copy link

enso-bot bot commented Jun 13, 2024

Dmitry Bushev reports a new STANDUP for today (2024-06-13):

Progress: Continue working on the task. Added IdMap to a runtime module. Updated the logic that updates the internal module state. Fixed the runtime test with IdMap. Debugging the TreeToIr changes that make some runtime tests to fail. It should be finished by 2024-06-14.

Next Day: Next day I will be working on the #10182 task. Continue working on the task

@enso-bot
Copy link

enso-bot bot commented Jun 14, 2024

Dmitry Bushev reports a new STANDUP for today (2024-06-14):

Progress: Continue working on the task. Fixed the runtime tests. Cleaned up and undrafted the PR. Implemented asynchronous Ydoc startup in the language server. It should be finished by 2024-06-14.

Next Day: Next day I will be working on the #10182 task. Continue working on the task

@mergify mergify bot closed this as completed in #10283 Jun 15, 2024
@mergify mergify bot closed this as completed in 04a92ef Jun 15, 2024
@github-project-automation github-project-automation bot moved this from 🔧 Implementation to 🟢 Accepted in Issues Board Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant