Skip to content

Commit d693c76

Browse files
author
ci-bot
committed
parser
1 parent ccb2c16 commit d693c76

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22
import { CompilerAbstract } from '@remix-project/remix-solidity'
3-
import { Compiler, ImportResolver } from '@remix-project/remix-solidity'
3+
import { SmartCompiler, ImportResolver } from '@remix-project/remix-solidity'
44

55
import { CompilationResult, CompilationSource } from '@remix-project/remix-solidity'
66
import { CodeParser } from "../code-parser";
@@ -119,11 +119,12 @@ export default class CodeParserCompiler {
119119
this.plugin.emit('astFinished')
120120
}
121121

122-
this.compiler = new Compiler(
123-
(url, cb) => { return this.plugin.call('contentImport', 'resolveAndSave', url).then((result) => cb(null, result)).catch((error: Error) => cb(error.message)) },
124-
(target) => {
125-
// Factory function: creates a new ImportResolver for each compilation
126-
return new ImportResolver(this.plugin, target)
122+
this.compiler = new SmartCompiler(
123+
this.plugin,
124+
(url, cb) => {
125+
return this.plugin.call('contentImport', 'resolveAndSave', url)
126+
.then((result) => cb(null, result))
127+
.catch((error: Error) => cb(error))
127128
}
128129
)
129130
this.compiler.event.register('compilationFinished', this.onAstFinished)

0 commit comments

Comments
 (0)