From 7e3cdc25a77a1d140a800c0cd76abe92b3107d0f Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Thu, 14 Dec 2023 15:57:03 +0100 Subject: [PATCH] Fix imported modules --- package.json | 2 +- src/TraceViewer.ts | 9 +++++++-- src/workers/python/build_package.py | 2 +- src/workers/python/papyros/papyros.py | 2 +- yarn.lock | 8 ++++---- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index eec1b8cf..2b21d862 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@codemirror/state": "^6.3.2", "@codemirror/theme-one-dark": "^6.1.2", "@codemirror/view": "^6.22.1", - "@dodona/trace-component": "1.1.0", + "@dodona/trace-component": "1.1.1", "@lezer/common": "^1.1.0", "comlink": "^4.4.1", "comsync": "^0.0.9", diff --git a/src/TraceViewer.ts b/src/TraceViewer.ts index e885f037..9e00c132 100644 --- a/src/TraceViewer.ts +++ b/src/TraceViewer.ts @@ -32,12 +32,17 @@ export class TraceViewer extends Renderable { }); BackendManager.subscribe(BackendEventType.Frame, e => { const frame = JSON.parse(e.data); - this.frameStates.push({ + const frameState = { line: frame.line, outputs: this.currentOutputs, inputs: this.currentInputs - }); + }; + this.frameStates.push(frameState); this.traceComponent?.addFrame(frame); + BackendManager.publish({ + type: BackendEventType.FrameChange, + data: frameState + }); }); } diff --git a/src/workers/python/build_package.py b/src/workers/python/build_package.py index 930b657c..7a6f99a8 100644 --- a/src/workers/python/build_package.py +++ b/src/workers/python/build_package.py @@ -45,4 +45,4 @@ def check_tar(tarname, out_dir="."): if __name__ == "__main__": - create_package("python_package", "python-runner friendly_traceback pylint<3.0.0 tomli typing-extensions json-tracer>=0.4.0", extra_deps="papyros") + create_package("python_package", "python-runner friendly_traceback pylint<3.0.0 tomli typing-extensions json-tracer>=0.4.1", extra_deps="papyros") diff --git a/src/workers/python/papyros/papyros.py b/src/workers/python/papyros/papyros.py index 967beda6..81de08e9 100644 --- a/src/workers/python/papyros/papyros.py +++ b/src/workers/python/papyros/papyros.py @@ -20,7 +20,7 @@ def __init__( self, *, source_code="", - filename="/my_program.py", + filename="/__main__.py", callback=None, buffer_constructor=None, limit=SYS_RECURSION_LIMIT diff --git a/yarn.lock b/yarn.lock index 27b78296..6773c19d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -504,10 +504,10 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@dodona/trace-component@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@dodona/trace-component/-/trace-component-1.1.0.tgz#137eabd14907e50573fc8e60f1edc0c70c7e9a5a" - integrity sha512-WaJPJjZJWPwuRCQQzJYWKXbmanSlzjGo4oBDQoOT8ACRjJSp5ADrrs6BZUFKShRIYspVanZ6iyv0W/KLmU42QQ== +"@dodona/trace-component@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@dodona/trace-component/-/trace-component-1.1.1.tgz#183c80e2d8e55832b78f40493c856c1f223af91c" + integrity sha512-R1mDPSp7gE6YEa4yOlLx1fUks9PTDumLqF8cctyEI6WFDqwX/e6B0RI/iJFaUNzkBTaptwCiYHvvXLdS0Hpakw== dependencies: "@jsplumb/browser-ui" "^6.2.10" lit "^3.0.0"