Open jessfraz opened 3 months ago
The app is trying to go through this path:
source range selection -> pathToNode -> call AST node -> variable declaration AST node -> variable name -> variable value in ProgramMemory (should be ExtrudeGroup or SketchGroup) -> face or plane
Unfortunately, that's impossible unless the KCL has assigned the pipeline to a variable. If you add let x =
to the first line, all problems go away. The assumption that there is a variable is deeply ingrained.
To fix this right, we need @Irev-Dev's changes from #3140 so that we can find the face or plane from an arbitrary UUID that the user has clicked.
In the meantime, I thought we could require KCL authors to always use a variable. A parse error would hopefully guide users to fixing their code.
Is it easy to make an auto-fix that can migrate users' code? That would be ideal.
But also, the variable requirement would go away once the artifact graph was completed.
id rather just disable the button on these? is that possible or we wait for kurts change because changing kcl is not going to work that will break everyone more
@Irev-Dev can you get in your PR by our monday?
It should be possible to disable the button until Kurt's change is in.
The change is in!
Temp fix to stop user from getting into a bad state is here: https://github.com/KittyCAD/modeling-app/pull/3292 Not closing this issue out yet though. Quick explanation
https://github.com/user-attachments/assets/01fdb43c-ddee-45e8-9d62-6cddd2b5b8ff
see video
https://github.com/user-attachments/assets/0814eb64-9a80-4efd-8c4c-522b16ce5d94
more info here https://kittycadworkspace.slack.com/archives/C04KFV6NKL0/p1722552201055069