enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.31k stars 318 forks source link

Graph Structure sometimes lost after reopening the project #7160

Closed radeusgd closed 4 months ago

radeusgd commented 1 year ago

It is well known that performing edits to a file invalidates its metadata and makes it lose its structure. That is a problem of itself, but this issue is about a broader issue.

While this was not happening to me for a while now, I've now got a project in which I'm losing the graph structure after reopening it - without editing it in the meantime.

My repro is:

  1. Open the project.
  2. Move some nodes to different places.
  3. Ctrl+S
  4. Edit a node to prove that the changes are saved (we will see if the changed text appears after reopening).
  5. Ctrl+S
  6. Close Enso with the "X" button on the native Window.
  7. Reopen the project.
  8. See that the nodes are back in the 'default reset' positions.

This does not happen in every project. But in one project I have, I can reproduce it consistently - out of ~4-5 retries I did on this particular project I always got a reset after reloading.

Here is a video showing my workflow:

https://github.com/enso-org/enso/assets/1436948/ab2a7165-67c7-4899-830c-25c38345c24f

And below I attach the project on which this repro works (there are 2 directories - "before" can be used as a base for the repro - it's state before taking the video, "after" could maybe help checking what happened to metadata - its the state after taking the video (i.e. after reloading the project and closing it again).

repro 3.zip

farmaazon commented 1 year ago

This issue was long ago reported by me https://github.com/enso-org/enso/issues/6161 but closed because no other project seems to have similar problem.

Keeping this issue, as it seems to have more detailed description.

farmaazon commented 4 months ago

No longer reproducible in new GUI.