Eugleo / magic-racket

The best coding experience for Racket in VS Code
https://marketplace.visualstudio.com/items?itemName=evzen-wybitul.magic-racket
GNU General Public License v3.0
199 stars 29 forks source link

"Load file in REPL" not works #94

Closed chemPolonium closed 1 year ago

chemPolonium commented 1 year ago

Environment

Error message

enter!: not a module path or #f

Additional context

If click "Load file in REPL" the first time, this error will occur. The second time (with REPL open) click "Load file in REPL" will work fine.

The whole terminal output:

PS C:\Users\chemp\OneDrive\Source\Racket\SICP> racket --repl --eval '(enter! (file \"c:/Users/chemp/OneDrive/Source/Racket/SICP/e2-89.rkt\"))'
Welcome to Racket v8.7 [cs].
enter!: not a module path or #f
  at: (file |"c:/Users/chemp/OneDrive/Source/Racket/SICP/e2-89.rkt"|)
  in: (enter! (file |"c:/Users/chemp/OneDrive/Source/Racket/SICP/e2-89.rkt"|))
  context...:
   C:\Users\chemp\scoop\apps\racket\current\collects\racket\enter.rkt:10:0

I tried this in powershell and it works

PS C:\Users\chemp\OneDrive\Source\Racket\SICP> racket --repl --eval '(enter! (file "c:/Users/chemp/OneDrive/Source/Racket/SICP/e2-89.rkt"))'

Maybe it's because a redundant \.

anryoshi commented 1 year ago

Looks like there is a difference between PS versions. Behavior works with PS version 5.1, but fails with 7.3.1 (probably for all versions >=7). At the same time this fragment works with modern PS versions. Probably matching should be adjusted with respect of version.

jryans commented 1 year ago

This should now be fixed by https://github.com/Eugleo/magic-racket/pull/110.