diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-02-07 19:13:24 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-02-07 19:13:24 +0800 |
commit | fd4d3cff880e9131d55a4e534c17289db5f72b6b (patch) | |
tree | 252302871a01eee80ae64966ed72dc82b6eda1aa /packages | |
parent | 88432a5e673e0b98aa45145394e6b6fe1bedf20d (diff) | |
download | dexon-0x-contracts-fd4d3cff880e9131d55a4e534c17289db5f72b6b.tar dexon-0x-contracts-fd4d3cff880e9131d55a4e534c17289db5f72b6b.tar.gz dexon-0x-contracts-fd4d3cff880e9131d55a4e534c17289db5f72b6b.tar.bz2 dexon-0x-contracts-fd4d3cff880e9131d55a4e534c17289db5f72b6b.tar.lz dexon-0x-contracts-fd4d3cff880e9131d55a4e534c17289db5f72b6b.tar.xz dexon-0x-contracts-fd4d3cff880e9131d55a4e534c17289db5f72b6b.tar.zst dexon-0x-contracts-fd4d3cff880e9131d55a4e534c17289db5f72b6b.zip |
Fix sol-compiler bug with remappings causing smart recompilation to now work
Diffstat (limited to 'packages')
-rw-r--r-- | packages/metacoin/package.json | 3 | ||||
-rw-r--r-- | packages/sol-compiler/CHANGELOG.json | 9 | ||||
-rw-r--r-- | packages/sol-compiler/src/compiler.ts | 5 |
3 files changed, 15 insertions, 2 deletions
diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 24b387355..fbff1c62a 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -24,7 +24,8 @@ "profiler:report:html": "istanbul report html && open coverage/index.html", "coverage:report:lcov": "istanbul report lcov", "test:circleci": "yarn test:coverage", - "compile": "sol-compiler compile" + "compile": "sol-compiler", + "watch": "sol-compiler -w" }, "author": "", "license": "Apache-2.0", diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json index 5f103342e..dd65f3aed 100644 --- a/packages/sol-compiler/CHANGELOG.json +++ b/packages/sol-compiler/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "version": "3.0.2", + "changes": [ + { + "note": "Fix a bug when smart recompilation wasn't working because of remappings", + "pr": 1575 + } + ] + }, + { "timestamp": 1549452781, "version": "3.0.1", "changes": [ diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index 743acacaa..c5dea1155 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -324,7 +324,10 @@ export class Compiler { } else { const currentArtifact = contractData.currentArtifactIfExists as ContractArtifact; const isUserOnLatestVersion = currentArtifact.schemaVersion === constants.LATEST_ARTIFACT_VERSION; - const didCompilerSettingsChange = !_.isEqual(currentArtifact.compiler.settings, this._compilerSettings); + const didCompilerSettingsChange = !_.isEqual( + _.omit(currentArtifact.compiler.settings, 'remappings'), + this._compilerSettings, + ); const didSourceChange = currentArtifact.sourceTreeHashHex !== contractData.sourceTreeHashHex; return !isUserOnLatestVersion || didCompilerSettingsChange || didSourceChange; } |