From 8a09a4cba114776b992b957b183abef742501773 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 17 Oct 2017 12:20:30 +0200 Subject: [PATCH] Rely on standard wrapper for single-file compiler versions. --- src/app/compiler/compiler-worker.js | 3 +-- src/app/compiler/compiler.js | 8 -------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/app/compiler/compiler-worker.js b/src/app/compiler/compiler-worker.js index 63a41ba791..14e630aeaf 100644 --- a/src/app/compiler/compiler-worker.js +++ b/src/app/compiler/compiler-worker.js @@ -33,8 +33,7 @@ module.exports = function (self) { self.postMessage({ cmd: 'versionLoaded', - data: compiler.version(), - acceptsMultipleFiles: compiler.supportsMulti + data: compiler.version() }) break case 'compile': diff --git a/src/app/compiler/compiler.js b/src/app/compiler/compiler.js index 0884e2453d..76b1a9d1fd 100644 --- a/src/app/compiler/compiler.js +++ b/src/app/compiler/compiler.js @@ -19,7 +19,6 @@ function Compiler (handleImportCall) { this.event = new EventManager() var compileJSON - var compilerAcceptsMultipleFiles var worker = null @@ -74,8 +73,6 @@ function Compiler (handleImportCall) { if (worker === null) { var compiler = solc(window.Module) - compilerAcceptsMultipleFiles = compiler.supportsMulti - compileJSON = function (source, optimize, cb) { var missingInputs = [] var missingInputsCallback = function (path) { @@ -261,7 +258,6 @@ function Compiler (handleImportCall) { var data = msg.data switch (data.cmd) { case 'versionLoaded': - compilerAcceptsMultipleFiles = !!data.acceptsMultipleFiles onCompilerLoaded(data.data) break case 'compiled': @@ -295,10 +291,6 @@ function Compiler (handleImportCall) { function gatherImports (files, target, importHints, cb) { importHints = importHints || [] - if (!compilerAcceptsMultipleFiles) { - cb(null, files[target]) - return - } // FIXME: This will only match imports if the file begins with one. // It should tokenize by lines and check each.