From 5bdf61c5cc264168601db8865c9b6868dcdfe633 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Tue, 31 May 2022 18:05:38 +0200 Subject: [PATCH] log --- libs/remix-core-plugin/src/lib/editor-context-listener.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/remix-core-plugin/src/lib/editor-context-listener.ts b/libs/remix-core-plugin/src/lib/editor-context-listener.ts index 8ec73289c5..144076cfae 100644 --- a/libs/remix-core-plugin/src/lib/editor-context-listener.ts +++ b/libs/remix-core-plugin/src/lib/editor-context-listener.ts @@ -69,8 +69,13 @@ export class EditorContextListener extends Plugin { this.on('solidity', 'loadingCompiler', async (url) => { console.log('loading compiler', url) - this.compiler.event.register('compilerLoaded', async () => await this.compile()) this.compiler.loadVersion(true, url) + this.compiler.event.register('compilerLoaded', async () =>{ + console.log('compiler loaded') + await this.compile() + await this.getAST() + }) + }) this.compiler = new Compiler((url, cb) => this.call('contentImport', 'resolveAndSave', url, undefined, false).then((result) => cb(null, result)).catch((error) => cb(error.message))) @@ -162,6 +167,7 @@ export class EditorContextListener extends Plugin { this.currentFile = await this.call('fileManager', 'file') if (!this.currentFile) return const content = await this.call('fileManager', 'readFile', this.currentFile) + console.log('compile', this.currentFile, content) const sources = { [this.currentFile]: { content } } this.compiler.compile(sources, this.currentFile) } catch (e) {