From e2e477576eabb7006d7c9e74cc363c15306d9fde Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Tue, 7 Nov 2023 11:49:05 +0000 Subject: [PATCH] fix: remove aztec.nr version check from noir-compiler (#3263) Removes bad check: noir-compiler's package.json never gets the latest version in so it would always fail this check. Ideal case would be to properly version aztec.nr and check against that version. --- yarn-project/noir-compiler/src/index.ts | 5 ----- yarn-project/noir-compiler/src/versions.ts | 1 - 2 files changed, 6 deletions(-) diff --git a/yarn-project/noir-compiler/src/index.ts b/yarn-project/noir-compiler/src/index.ts index 7aaaa3065e9..a8ecf376595 100644 --- a/yarn-project/noir-compiler/src/index.ts +++ b/yarn-project/noir-compiler/src/index.ts @@ -7,7 +7,6 @@ import { CompileOpts, NargoContractCompiler } from './compile/nargo.js'; import { FileManager } from './compile/noir/file-manager/file-manager.js'; import { NoirWasmCompileOptions, NoirWasmContractCompiler } from './compile/noir/noir-wasm-compiler.js'; import { generateContractArtifact } from './contract-interface-gen/abi.js'; -import { AztecNrVersion } from './versions.js'; export * from './versions.js'; @@ -45,9 +44,5 @@ export async function compileUsingNoirWasm( const artifacts = await compiler.compile(); const resolvedAztecNrVersion = compiler.getResolvedAztecNrVersion(); - if (resolvedAztecNrVersion && AztecNrVersion !== resolvedAztecNrVersion) { - opts.log(`WARNING: Aztec.nr version mismatch: expected "${AztecNrVersion}", got "${resolvedAztecNrVersion}"`); - } - return artifacts.map(artifact => generateContractArtifact(artifact, resolvedAztecNrVersion)); } diff --git a/yarn-project/noir-compiler/src/versions.ts b/yarn-project/noir-compiler/src/versions.ts index 6adcb486e03..43f9383e7d4 100644 --- a/yarn-project/noir-compiler/src/versions.ts +++ b/yarn-project/noir-compiler/src/versions.ts @@ -5,7 +5,6 @@ import NoirVersion from './noir-version.json' assert { type: 'json' }; // read package.json at runtime instead of compile time so that we keep rootDir as-is in tsconfig const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf-8')); -export const AztecNrVersion = `aztec-packages-v${pkg.version}`; export const NoirWasmVersion = pkg.dependencies['@noir-lang/noir_wasm']; export const NoirTag = NoirVersion.tag; export const NoirCommit = NoirVersion.commit;