dart_repl icon indicating copy to clipboard operation
dart_repl copied to clipboard

need to use consistent path for scratchpad dart file

Open maks opened this issue 3 years ago • 2 comments
trafficstars

When using as a "globally activated" package, we get:

drepl
Building package executable... (3.3s)
Built repl:main.
...
Type `exit()` or Ctrl-d to quit.
Unhandled exception:
Instance of 'InvalidPathResult'
#0      repl (package:repl/repl.dart:36:5)
...

Because currently the path code in repl.dart uses relative paths.

Need to instead use a consistent path, eg, to system temp dir location.

maks avatar May 24 '22 00:05 maks

I have encountered the same errors when I tried this package recently.

C:\Users\Liu.D.H>drepl
The Dart VM service is listening on http://127.0.0.1:8181/V9qudryS0z4=/
The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/V9qudryS0z4=/devtools/#/?uri=ws%3A%2F%2F127.0.0.1%3A8181%2FV9qudryS0z4%3D%2Fws
2.18.0 (stable) (Fri Aug 26 10:22:54 2022 +0000) on "windows_x64"
Type `exit()` or Ctrl-d to quit.
Unhandled exception:
Instance of 'InvalidPathResult'
#0      repl (package:repl/repl.dart:36:5)
<asynchronous suspension>
#1      wrappedMain (file:///C:/Users/Liu.D.H/AppData/Local/Pub/Cache/hosted/mirrors.tuna.tsinghua.edu.cn%2547dart-pub%2547/repl-0.1.0+1/bin/main.dart:18:3)
<asynchronous suspension>

C:\Users\Liu.D.H>

I hope this package could be usable in the near feature.

liudonghua123 avatar Sep 07 '22 13:09 liudonghua123

Hi, thanks for reporting this. Yes I haven't tested the package at all on anything other than Linux yet. Unfortunately there are a few limitations at the moment given the way this package has had to be implemented. I'm hoping to get back to working on it again in the future, but I don't have time at the moment.

maks avatar Sep 14 '22 02:09 maks