Bug: Saving models in text mode with import statement will break the project on next load #2446
Open
1 of 8 tasks
Labels
Component: Text Mode
Studio Core Team
Opened by a member of the Studio core team
Type: Bug
Type: Regression
A bug that did not exist in previous versions
Milestone
Similar issues
How are you using Studio?
Legend Studio
Current and expected behavior
A while ago, we removed graph building from text mode, users now can save their changes directly from text mode, but due to this, sometimes, they could accidentally save text of models which depends on import statement to fully resolve paths; this is bad since we skip
SectionIndex
when persisting to SDLC. Previously, when we still build the graph in text-mode, the diff algo will make use of graph builder to fully resolve all the paths before saving, this is no-longer the case.Steps to reproduce
Copy and paste the following provided text in text-mode and save, the next load the project will be broken and users will be asked to return to text-mode.
Model data
Environment
No response
Possible solution and workaround
The possible solution is to enforce path resolution before saving in text-mode so we save entities with all paths resolved, i.e. rid ourselves of the responsibility to save import statements. I think we can follow the steps below in terms of mechanic and interaction:
ActionAlert
): "Import statements will not be saved, we can attempt to automatically resolve the full paths, or you can manually resolve them, remove the import statements, and try saving again" Have 2 actions: "Resolve automatically", "Resolve manually"Resolve Manually
nothing to be done, just close theActionAlert
BlockingAlert
to prevent users from making any changes/actions that might interfere with the processContribution
The text was updated successfully, but these errors were encountered: