From f9c3d30290dd26704fff2f6aa41c12640ea2a599 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 26 Feb 2019 11:14:43 -0800 Subject: [PATCH] Warn instead of error on incompatible solc version https://github.com/0xProject/dev-tools-truffle-example/issues/4#issuecomment-467566232 --- .../src/artifact_adapters/truffle_artifact_adapter.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts b/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts index bb2b151530..3474e71cd6 100644 --- a/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts +++ b/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts @@ -1,4 +1,5 @@ import { Compiler, CompilerOptions } from '@0x/sol-compiler'; +import { logUtils } from '@0x/utils'; import * as fs from 'fs'; import * as glob from 'glob'; import * as path from 'path'; @@ -77,11 +78,10 @@ export class TruffleArtifactAdapter extends AbstractArtifactAdapter { const artifact = JSON.parse(fs.readFileSync(artifactFileName).toString()); const compilerVersion = artifact.compiler.version; if (!compilerVersion.startsWith(this._solcVersion)) { - throw new Error( - `${artifact.contractName} was compiled with solidity ${compilerVersion} but specified version is ${ + logUtils.warn(`${artifact.contractName} was compiled with solidity ${compilerVersion} but specified version is ${ this._solcVersion - } making it impossible to process traces`, - ); + } making it impossible to process traces. Skipping...`); + continue; } } }