Clear the diagnostics before processing (#3118)

clear diagnostics when we update the text

Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
This commit is contained in:
Paul Tagliamonte
2024-07-24 16:11:56 -04:00
committed by GitHub
parent 22df47fa96
commit 385589ddf9
4 changed files with 20 additions and 11 deletions

View File

@ -190,11 +190,6 @@ export class KclManager {
const currentExecutionId = executionId || Date.now()
this._cancelTokens.set(currentExecutionId, false)
// here we're going to clear diagnostics since we're the first
// one in. We're the only location where diagnostics are cleared;
// everything from here on out should be *appending*.
editorManager.clearDiagnostics()
this.isExecuting = true
await this.ensureWasmInit()
const { logs, errors, programMemory } = await executeAst({
@ -272,11 +267,6 @@ export class KclManager {
await this?.engineCommandManager?.waitForReady
this._ast = { ...newAst }
// here we're going to clear diagnostics since we're the first
// one in. We're the only location where diagnostics are cleared;
// everything from here on out should be *appending*.
editorManager.clearDiagnostics()
const { logs, errors, programMemory } = await executeAst({
ast: newAst,
engineCommandManager: this.engineCommandManager,