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
202 stars 28 forks source link

require in VS Code Magic Racket #69

Closed JosephDenman closed 2 years ago

JosephDenman commented 2 years ago

This is not so much an issue as a question, and it might be the wrong forum, but...

I'm new to Racket. I switched from DrRacket to VSCode with Magic Racket plugin. In DrRacket, my requires work fine, but after switching to VSCode, none of my imports are recognized. I see something like:

iMac-Pro: project me$ raco make src/main/racket/server.rkt
src/main/racket/server.rkt:19:30: make-evaluator: unbound identifier
  in: make-evaluator
  compilation context...:
   /Users/me/Racket/project/src/main/racket/server.rkt
  location...:
   src/main/racket/server.rkt:19:30
  context...:
   /Applications/Racket v8.3/collects/compiler/private/cm-minimal.rkt:685:0: compile-zo*
   /Applications/Racket v8.3/collects/compiler/private/cm-minimal.rkt:451:15
   /Applications/Racket v8.3/collects/compiler/private/cm-minimal.rkt:440:12: build
   /Applications/Racket v8.3/collects/compiler/private/cm-minimal.rkt:411:0: maybe-compile-zo
   /Applications/Racket v8.3/collects/compiler/private/cm-minimal.rkt:209:0: compile-root
   /Applications/Racket v8.3/collects/compiler/private/cm-minimal.rkt:105:4
   /Applications/Racket v8.3/share/pkgs/compiler-lib/compiler/commands/make.rkt:69:0
   body of "/Applications/Racket v8.3/share/pkgs/compiler-lib/compiler/commands/make.rkt"
   /Applications/Racket v8.3/collects/raco/raco.rkt:41:0
   body of "/Applications/Racket v8.3/collects/raco/raco.rkt"
   body of "/Applications/Racket v8.3/collects/raco/main.rkt"

There's a call to make-evaluator that's unrecognized, despite the (require racket/sandbox) at the top of the file. I already have the sandbox-lib package installed:

iMac-Pro:project me$ raco pkg show --all
Installation-wide:
 Package[*=auto]               Checksum         Source 
 ...
 sandbox-lib*                  7785f2a1e19c...  catalog...x-lib
 ...

Does anyone have an idea of what could be going wrong?

JosephDenman commented 2 years ago

Simple fix. Just enable auto-save in VS Code.