Fix sol-compiler bug with remappings causing smart recompilation to now work

This commit is contained in:
Leonid Logvinov
2019-02-07 12:13:24 +01:00
parent 88432a5e67
commit fd4d3cff88
4 changed files with 17 additions and 2 deletions

View File

@@ -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;
}