From 8b8f5005e61ea4a6d08b013c7cb6d0179e245152 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 22 Feb 2023 08:37:23 +0100 Subject: [PATCH 1/3] Update solidityImport.test.ts fix test --- apps/remix-ide-e2e/src/tests/solidityImport.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index 2b75395e2a..79272841cf 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -31,8 +31,7 @@ module.exports = { .isVisible({ selector: "//span[contains(.,'not found Untitled11')]", locateStrategy: 'xpath', - timeout: 120000, - suppressNotFoundErrors: true + timeout: 120000 }) }, From 3c6447f2479e4179a0f25b37de9e4cd87c383dc2 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 22 Feb 2023 12:00:33 +0100 Subject: [PATCH 2/3] Fixed down stream update sync --- libs/remixd/src/services/remixdClient.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/remixd/src/services/remixdClient.ts b/libs/remixd/src/services/remixdClient.ts index a3f3d9dd8f..4718cfbcf1 100644 --- a/libs/remixd/src/services/remixdClient.ts +++ b/libs/remixd/src/services/remixdClient.ts @@ -5,12 +5,14 @@ import * as utils from '../utils' import * as chokidar from 'chokidar' import * as fs from 'fs-extra' import * as isbinaryfile from 'isbinaryfile' +import * as pathModule from 'path' export class RemixdClient extends PluginClient { methods: Array websocket: WS currentSharedFolder: string watcher: chokidar.FSWatcher + trackDownStreamUpdate: Record = {} constructor (private readOnly = false) { super() @@ -105,6 +107,7 @@ export class RemixdClient extends PluginClient { this.createDir({ path: args.path.substr(0, args.path.lastIndexOf('/')) }) } try { + this.trackDownStreamUpdate[path] = args.content fs.writeFile(path, args.content, 'utf8', (error: Error) => { if (error) { console.log(error) @@ -263,8 +266,9 @@ export class RemixdClient extends PluginClient { }) */ this.watcher.on('change', async (f: string) => { - const currentContent = await this.call('editor', 'getText' as any, f) - const newContent = fs.readFileSync(f) + const path = pathModule.resolve(f) + const currentContent = this.trackDownStreamUpdate[path] + const newContent = fs.readFileSync(f, 'utf-8') if (currentContent !== newContent && this.isLoaded) { this.emit('changed', utils.relativePath(f, this.currentSharedFolder)) } From b865e91e71e259052c383fd76162ab59f98b7027 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 22 Feb 2023 12:00:33 +0100 Subject: [PATCH 3/3] Remove external commit --- apps/remix-ide-e2e/src/tests/solidityImport.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index 79272841cf..2b75395e2a 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -31,7 +31,8 @@ module.exports = { .isVisible({ selector: "//span[contains(.,'not found Untitled11')]", locateStrategy: 'xpath', - timeout: 120000 + timeout: 120000, + suppressNotFoundErrors: true }) },