From 8f64784781a0fe204108c8630113347b534b3e89 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 26 Feb 2019 13:50:45 -0800 Subject: [PATCH 1/2] Fix a bug when combining sol-compiler settings from different sources --- packages/sol-compiler/CHANGELOG.json | 10 +++++++++- packages/sol-compiler/src/compiler.ts | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json index 7ebe150c39..a82997dee2 100644 --- a/packages/sol-compiler/CHANGELOG.json +++ b/packages/sol-compiler/CHANGELOG.json @@ -1,4 +1,12 @@ [ + { + "version": "3.1.1", + "changes": [ + { + "note": "Fix a bug when combining compilerSettings from different sources", + } + ] + }, { "version": "3.1.0", "changes": [ @@ -513,4 +521,4 @@ ], "timestamp": 1518102000 } -] +] \ No newline at end of file diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index a1fec103ed..ef2334c3ac 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -107,7 +107,11 @@ export class Compiler { assert.doesConformToSchema('compiler.json', config, compilerOptionsSchema); this._contractsDir = path.resolve(passedOpts.contractsDir || config.contractsDir || DEFAULT_CONTRACTS_DIR); this._solcVersionIfExists = passedOpts.solcVersion || config.solcVersion; - this._compilerSettings = passedOpts.compilerSettings || config.compilerSettings || DEFAULT_COMPILER_SETTINGS; + this._compilerSettings = { + ...DEFAULT_COMPILER_SETTINGS, + ...config.compilerSettings, + ...passedOpts.compilerSettings, + }; this._artifactsDir = passedOpts.artifactsDir || config.artifactsDir || DEFAULT_ARTIFACTS_DIR; this._specifiedContracts = passedOpts.contracts || config.contracts || ALL_CONTRACTS_IDENTIFIER; this._useDockerisedSolc = From 885031d3ceaca59ece2558021d7fe054e30035ef Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 26 Feb 2019 14:15:23 -0800 Subject: [PATCH 2/2] Add PR number --- packages/sol-compiler/CHANGELOG.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json index a82997dee2..2b2f304145 100644 --- a/packages/sol-compiler/CHANGELOG.json +++ b/packages/sol-compiler/CHANGELOG.json @@ -4,6 +4,7 @@ "changes": [ { "note": "Fix a bug when combining compilerSettings from different sources", + "pr": 1652 } ] },