-
Notifications
You must be signed in to change notification settings - Fork 328
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
Editing outside of the node appears to reshuffle all nodes and break the layout #9389
Comments
It appears that we end up with
by GUI? Language server? |
Steps to reproduce:
|
The `null` check creates a new Array but always assumed a non-empty one which may lead to ``` java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 at org.enso.runtime/org.enso.interpreter.service.ExecutionService$FunctionPointer.collectNotAppliedArguments(ExecutionService.java:778) at org.enso.runtime/org.enso.interpreter.instrument.job.ProgramExecutionSupport$.sendExpressionUpdate(ProgramExecutionSupport.scala:430) at org.enso.runtime/org.enso.interpreter.instrument.job.ProgramExecutionSupport$.$anonfun$executeProgram$3(ProgramExecutionSupport.scala:81) at org.enso.runtime/org.enso.interpreter.service.ExecutionCallbacks.callOnComputedCallback(ExecutionCallbacks.java:146) at org.enso.runtime/org.enso.interpreter.service.ExecutionCallbacks.updateCachedResult(ExecutionCallbacks.java:117 ... ``` Added a guard to prevent the exception. The flag will be useless anyway as we won't enter the for-loop in this case. Appears to be introduced via #8743. Discovered while debugging #9389.
Reproduced; As currently numeric input accepts anything, we parse space and put it as "Block" node without lines, and probably then our "AST repairing system" inserts the parenthesis. I think we should be careful in what is accepted in numeric input - the AST block should not be. In this issue, undo is also broken sometimes. |
This should also be handled differently in |
We need to know what is the expected behavior here. Should the node be deleted, or should such edit be rejected? |
Technically, it is fixed by #10457 - now there is no way to put just any code into widgets. But the problem here may re-appear when implementing Code Input Widget - added a section there about repairing AST to not break graph. |
While waiting on the execution to finish, I start editing some node. Clicking outside of the node appears to collapse all nodes and order them in a single line. Video demonstrates the problem.
Kazam_screencast_00039.webm
There are two problems here
The text was updated successfully, but these errors were encountered: