Closed liudonghua123 closed 1 year ago
This is the problem: FileSystemException: Exists failed, path = 'C:\Users\LIUD~1.H\AppData\Local\Temp/dart_interactive_workspace_2022-10-22T22:38:56.335037' (OS Error: The filename, directory name, or volume label syntax is incorrect.
I should use "\" not "/", i.e. use path join instead of hardcoding "/". Will fix today.
Will fix this after CI is configured in order to verify CI correctness as well
https://github.com/fzyzcjy/dart_interactive/actions/runs/3305144365/jobs/5455011709
reproduced and fixed
FileSystemException: Exists failed, path = 'C:\Users\RUNNER~1\AppData\Local\Temp\dart_interactive_workspace_2022-10-23T00:17:14.630661' (OS Error: The filename, directory name, or volume label syntax is incorrect.
Hmm I do not have a windows at hand. Could you please debug it a little bit? It seems unrelated to the core of this package, but instead, only related to creating folders etc.
I will try to remove ":" etc now
it works
I updated the code and tried again. It's Could not start the VM service: localhost:8181 is already in use.
error. But I could not find any process serve 8181 port. Maybe a windows bug.
D:\code\dart\dart_interactive\packages\interactive>git pull
remote: Enumerating objects: 259, done.
remote: Counting objects: 100% (250/250), done.
remote: Compressing objects: 100% (100/100), done.
remote: Total 259 (delta 124), reused 238 (delta 112), pack-reused 9
Receiving objects: 100% (259/259), 99.25 KiB | 29.00 KiB/s, done.
Resolving deltas: 100% (124/124), completed with 2 local objects.
From github.com:fzyzcjy/dart_interactive
e3da481..cfe8098 master -> origin/master
* [new tag] v1.0.0 -> v1.0.0
* [new tag] v1.0.1 -> v1.0.1
Updating e3da481..cfe8098
Fast-forward
.all-contributorsrc | 54 +++
.github/ISSUE_TEMPLATE/bug_report.md | 38 ++
.github/ISSUE_TEMPLATE/feature_request.md | 20 +
.github/config.yml | 14 +
.github/dependabot.yml | 9 +
.github/settings.yml | 108 ++++++
.github/stale.yml | 17 +
.github/workflows/ci.yaml | 44 +++
.github/workflows/post_release.yml | 21 ++
.gitignore | 1 +
CHANGELOG.md | 8 +
LICENSE | 21 ++
README.md | 185 +++++++++-
doc/logo.svg | 1134 +--------------------------------------------------------
example/example.md | 1 +
justfile | 22 ++
packages/interactive/CHANGELOG.md | 1 +
packages/interactive/LICENSE | 1 +
packages/interactive/README.md | 1 +
packages/interactive/bin/interactive.dart | 30 +-
packages/interactive/lib/src/main.dart | 36 +-
packages/interactive/lib/src/runtime_support.dart | 20 +-
packages/interactive/lib/src/workspace_code.dart | 1 -
packages/interactive/lib/src/workspace_file_tree.dart | 28 +-
packages/interactive/lib/src/workspace_isolate.dart | 18 +-
packages/interactive/pubspec.yaml | 8 +-
packages/interactive/test/e2e_test.dart | 1 +
27 files changed, 680 insertions(+), 1162 deletions(-)
create mode 100644 .all-contributorsrc
create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md
create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md
create mode 100644 .github/config.yml
create mode 100644 .github/dependabot.yml
create mode 100644 .github/settings.yml
create mode 100644 .github/stale.yml
create mode 100644 .github/workflows/ci.yaml
create mode 100644 .github/workflows/post_release.yml
create mode 100644 CHANGELOG.md
create mode 100644 LICENSE
create mode 100644 example/example.md
create mode 100644 justfile
create mode 120000 packages/interactive/CHANGELOG.md
create mode 120000 packages/interactive/LICENSE
create mode 120000 packages/interactive/README.md
D:\code\dart\dart_interactive\packages\interactive>dart run --enable-vm-service bin/interactive.dart
The Dart VM service is listening on http://127.0.0.1:8181/7yCYZWVshzE=/
The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/7yCYZWVshzE=/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A8181%2F7yCYZWVshzE%3D%2Fws
Run: D:\apps\flutter\bin\cache\dart-sdk\bin\dart.exe [--enable-vm-service, file:///D:/code/dart/dart_interactive/packages/interactive/bin/interactive.dart, --vm-service-was-enabled]
Could not start the VM service: localhost:8181 is already in use.
D:\code\dart\dart_interactive\packages\interactive>netstat -nao|findstr 8181
D:\code\dart\dart_interactive\packages\interactive>dart run --enable-vm-service bin/interactive.dart
The Dart VM service is listening on http://127.0.0.1:8181/bfsiTaXMX_w=/
The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/bfsiTaXMX_w=/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A8181%2FbfsiTaXMX_w%3D%2Fws
Run: D:\apps\flutter\bin\cache\dart-sdk\bin\dart.exe [--enable-vm-service, file:///D:/code/dart/dart_interactive/packages/interactive/bin/interactive.dart, --vm-service-was-enabled]
Could not start the VM service: localhost:8181 is already in use.
D:\code\dart\dart_interactive\packages\interactive>
8181 is probably because you already start one, and do not stop/kill it
btw CI on windows runs well. could you please check that to see differences?
Yes, I changed to another port like 12345. It seems work now.
From the console log, I found both 12345
and 8181
used internal?
D:\code\dart\dart_interactive\packages\interactive>dart run --enable-vm-service=12345 bin/interactive.dart
The Dart VM service is listening on http://127.0.0.1:12345/AaP2buyvNjQ=/
The Dart DevTools debugger and profiler is available at: http://127.0.0.1:12345/AaP2buyvNjQ=/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A12345%2FAaP2buyvNjQ%3D%2Fws
Run: D:\apps\flutter\bin\cache\dart-sdk\bin\dart.exe [--enable-vm-service, file:///D:/code/dart/dart_interactive/packages/interactive/bin/interactive.dart, --vm-service-was-enabled]
The Dart VM service is listening on http://127.0.0.1:8181/0G1Fddx3S8c=/
The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/0G1Fddx3S8c=/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A8181%2F0G1Fddx3S8c%3D%2Fws
Workspace: C:\Users\LIUD~1.H\AppData\Local\Temp\dart_interactive_workspace_2022-10-23T213208841490
>>> String hello="hello"
[WARNING 2022-10-23 21:32:20.425019] Error: Hot reload failed, maybe because code has syntax error?
>>> var hello="hello";
[WARNING 2022-10-23 21:32:32.773892] Please use `a=1` instead of `var a=1`
>>> a=1
1
>>> hello="hello"
hello
>>>
Weird. I suspect it is run twice. i.e. interactive calls interactive calls interactive (originally should be: interactive calls interactive, where the latter has vm serviice enabled)
Oh I see, please do not use dart run!
use new syntax here: https://github.com/fzyzcjy/dart_interactive#-getting-started
use new syntax here: https://github.com/fzyzcjy/dart_interactive#-getting-started
Thanks, now I tried the new usage, it works.
C:\Users\Liu.D.H>dart pub global activate interactive
Resolving dependencies...
Because pub global activate depends on interactive any which doesn't exist (could not find package interactive at
https://mirrors.tuna.tsinghua.edu.cn/dart-pub/), version solving failed.
C:\Users\Liu.D.H>set PUB_HOSTED_URL=
C:\Users\Liu.D.H>dart pub global activate interactive
Resolving dependencies...
+ _fe_analyzer_shared 49.0.0
+ analyzer 5.1.0
+ args 2.3.1
+ async 2.9.0
+ cli_repl 0.2.3
+ collection 1.17.0
+ convert 3.1.1
+ crypto 3.0.2
+ file 6.1.4
+ glob 2.1.0
+ interactive 1.0.1
+ js 0.6.5
+ logging 1.1.0
+ meta 1.8.0
+ package_config 2.1.0
+ path 1.8.2
+ pub_semver 2.1.2
+ source_span 1.9.1
+ string_scanner 1.1.1
+ term_glyph 1.2.1
+ typed_data 1.3.1
+ vm_service 9.4.0
+ watcher 1.0.2
+ yaml 3.1.1
Downloading interactive 1.0.1...
Downloading path 1.8.2...
Downloading logging 1.1.0...
Downloading collection 1.17.0...
Downloading cli_repl 0.2.3...
Downloading args 2.3.1...
Downloading analyzer 5.1.0...
Downloading _fe_analyzer_shared 49.0.0...
Downloading meta 1.8.0...
Downloading js 0.6.5...
Downloading yaml 3.1.1...
Downloading string_scanner 1.1.1...
Downloading watcher 1.0.2...
Downloading package_config 2.1.0...
Downloading crypto 3.0.2...
Downloading typed_data 1.3.1...
Downloading vm_service 9.4.0...
Downloading pub_semver 2.1.2...
Downloading glob 2.1.0...
Downloading source_span 1.9.1...
Downloading term_glyph 1.2.1...
Downloading convert 3.1.1...
Downloading file 6.1.4...
Downloading async 2.9.0...
Building package executables...
Built interactive:interactive.
Installed executable interactive.
Activated interactive 1.0.1.
C:\Users\Liu.D.H>interactive
Run: D:\apps\flutter\bin\cache\dart-sdk\bin\dart.exe [--enable-vm-service, file:///C:/Users/Liu.D.H/AppData/Local/Pub/Cache/global_packages/interactive/bin/interactive.dart-2.18.2.snapshot, --vm-service-was-enabled]
The Dart VM service is listening on http://127.0.0.1:8181/C42iBdZFGzs=/
The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/C42iBdZFGzs=/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A8181%2FC42iBdZFGzs%3D%2Fws
Workspace: C:\Users\LIUD~1.H\AppData\Local\Temp\dart_interactive_workspace_2022-10-23T213851628321
>>> hello="hello"
hello
>>>
great!
I tried the guidance on readme (
Inside packages/interactive, execute dart run --enable-vm-service bin/interactive.dart.
), however, it not works for me.