diff --git a/IDE/dist/ProcessManager.js b/IDE/dist/ProcessManager.js index 992c709d6..ef0d866b9 100644 --- a/IDE/dist/ProcessManager.js +++ b/IDE/dist/ProcessManager.js @@ -168,21 +168,21 @@ function upload(data) { } exports.upload = upload; // this function starts a syntax check -// if a syntax check or build process is in progress they are stopped -// a running program is not stopped +// if a build is in progress, syntax check is not started +// if a syntax check is in progress it is restarted +// in all other cases, a syntax check is started immediately // this can be called either from upload() or from the frontend (via SocketManager) function checkSyntax(data) { if (!data.currentProject) return; var project = data.currentProject; - if (processes.syntax.get_status()) { + if (processes.build.get_status()) { + // do nothing + } + else if (processes.syntax.get_status()) { processes.syntax.stop(); processes.syntax.queue(function () { return processes.syntax.start(project); }); } - else if (processes.build.get_status()) { - processes.build.stop(); - processes.build.queue(function () { return processes.syntax.start(project); }); - } else { processes.syntax.start(project); } diff --git a/IDE/src/ProcessManager.ts b/IDE/src/ProcessManager.ts index 0edcdbd92..558f40540 100644 --- a/IDE/src/ProcessManager.ts +++ b/IDE/src/ProcessManager.ts @@ -81,19 +81,19 @@ export async function upload(data: any){ } // this function starts a syntax check -// if a syntax check or build process is in progress they are stopped -// a running program is not stopped +// if a build is in progress, syntax check is not started +// if a syntax check is in progress it is restarted +// in all other cases, a syntax check is started immediately // this can be called either from upload() or from the frontend (via SocketManager) export function checkSyntax(data: any){ if(!data.currentProject) return; let project : string = data.currentProject; - if (processes.syntax.get_status()){ + if (processes.build.get_status()){ + // do nothing + } else if (processes.syntax.get_status()){ processes.syntax.stop(); processes.syntax.queue(() => processes.syntax.start(project)); - } else if (processes.build.get_status()){ - processes.build.stop(); - processes.build.queue( () => processes.syntax.start(project) ); } else { processes.syntax.start(project); }