-
Notifications
You must be signed in to change notification settings - Fork 78
Update artifact graph only when no error #7072
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
base: main
Are you sure you want to change the base?
Update artifact graph only when no error #7072
Conversation
Maybe fixes #6297
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -487,10 +487,10 @@ export class KclManager { | |||
if (!errors.length) { | |||
this.lastSuccessfulVariables = execState.variables | |||
this.lastSuccessfulOperations = execState.operations | |||
// updateArtifactGraph relies on updated executeState/variables | |||
await this.updateArtifactGraph(execState.artifactGraph) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recording.2025-05-19.133425.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should have everything up until the point it failed so maybe the test needs to do a bit more, your current test only has a single batch, you need more than one batch for this for work, basically extrude something then fail after that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are you trying to accomplish?
When there's an error, the artifact graph and operations are properties of the KCLError
instance, and the execState
is a dummy. See handleExecuteError()
.
modeling-app/src/lang/langHelpers.ts
Line 129 in c2f6ce0
execState: emptyExecState(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider changing handleExecuteError()
to copy artifactGraph
and operations
to the execState
to present a uniform interface. But I know that some things are only done on success or only on error, so we need to be careful.
…t-back-on-errors-to-do-selections-on-whatever-did-work
…t-back-on-errors-to-do-selections-on-whatever-did-work
Maybe fixes #6297