From f3ebf0f0bf91f3983e1f9f0e1fbb31b4dfb877ea Mon Sep 17 00:00:00 2001 From: Jeff Raymakers Date: Mon, 7 Oct 2024 20:20:15 -0700 Subject: [PATCH] add logging to check func sigs script --- bindings/scripts/checkFunctionSignatures.mjs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/bindings/scripts/checkFunctionSignatures.mjs b/bindings/scripts/checkFunctionSignatures.mjs index 3aaed24..1dafc4e 100644 --- a/bindings/scripts/checkFunctionSignatures.mjs +++ b/bindings/scripts/checkFunctionSignatures.mjs @@ -54,15 +54,24 @@ function checkFunctionSignatures() { const typeDefsSigs = getFunctionSignaturesFromComments(typeDefsFilePath); const bindingsSigs = getFunctionSignaturesFromComments(bindingsFilePath); + console.log(`header sigs: ${headerSigs.length}`); + console.log(`type defs sigs: ${typeDefsSigs.length}`); + console.log(`bindings sigs: ${bindingsSigs.length}`); + const headerSigsJSON = JSON.stringify(headerSigs, null, 2); const typeDefsSigsJSON = JSON.stringify(typeDefsSigs, null, 2); const bindingsSigsJSON = JSON.stringify(bindingsSigs, null, 2); - if (headerSigsJSON !== typeDefsSigsJSON) { - console.warn('Type defs different!'); + if (headerSigsJSON === typeDefsSigsJSON) { + console.log('OK: Type defs sigs match header sigs'); + } else { + console.warn('WARNING: Type defs sigs DO NOT match header sigs!'); } - if (headerSigsJSON !== bindingsSigsJSON) { - console.warn('Bindings different!'); + + if (headerSigsJSON === bindingsSigsJSON) { + console.log('OK: Bindings sigs match header sigs'); + } else { + console.warn('WARNING: Bindings sigs DO NOT match header sigs!'); } if (process.argv[2] === 'writeFiles') {