From f7a23120b1128ba84469aedb950f430336afb4a6 Mon Sep 17 00:00:00 2001 From: Krasilnikov Roman Date: Fri, 9 Aug 2024 23:18:13 +0300 Subject: [PATCH] Java test compiler: reset output variable --- apps/ppp/src/adapters/runtime/java/test-compiler-factory.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/ppp/src/adapters/runtime/java/test-compiler-factory.ts b/apps/ppp/src/adapters/runtime/java/test-compiler-factory.ts index 01564f3..1874e13 100644 --- a/apps/ppp/src/adapters/runtime/java/test-compiler-factory.ts +++ b/apps/ppp/src/adapters/runtime/java/test-compiler-factory.ts @@ -50,6 +50,7 @@ export class JavaTestCompilerFactory { this.output = output; } protected override getNatives(input: I): Record { + this.output = undefined; return nativesFactory(input, this.saveOutput.bind(this)); } protected override getResult(): O { @@ -64,6 +65,8 @@ export class JavaTestCompilerFactory { if (files.length !== 1) { throw new Error("Compilation of multiple files is not implemented"); } + // TODO: Fix handling compilation errors or at least remove previous + // compilation output await compiler.compile( ctx, `${files[0].content}