From d61619c18403144f680db6d6648ca13e76f7d4c7 Mon Sep 17 00:00:00 2001 From: Artem Chystiakov Date: Mon, 1 Apr 2024 14:16:33 +0300 Subject: [PATCH] fix GC warnings --- scripts/circom.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/circom.ts b/scripts/circom.ts index 09a94a5..997e5d9 100644 --- a/scripts/circom.ts +++ b/scripts/circom.ts @@ -34,9 +34,15 @@ export async function compile(circuitId: string, shouldUpdateConfig = true) { const start = performance.now(); - // supressing deprecation warnings + // supressing garbage collection warnings const oldErr = console.error; - console.error = (...data: any[]) => {}; + console.error = (...data: any[]) => { + if (data.length > 0 && typeof data[0] == "string" && (data[0]).includes("garbage collection")) { + return; + } + + oldErr(data); + }; await circuit.compile();