racket / macro-debugger

Other
8 stars 16 forks source link

Requiring macro debugger causes error in Scribble sandboxed evaluator #45

Open countvajhula opened 5 months ago

countvajhula commented 5 months ago

Qi uses the macro-debugger module in its compiler to provide some visibility into compilation steps. This was causing the docs for packages depending on Qi (e.g. relation) to fail on the package index with the error:

dynamic-require: name is protected
  name: 'syntax-local-expand-observer
  module: #<resolved-module-path:'#%expobs>
  context...:
   body of "/Applications/Racket-Latest/share/pkgs/macro-debugger/macro-debugger/emit.rkt"
   /Applications/Racket-Latest/share/pkgs/sandbox-lib/racket/sandbox.rkt:754:18

This seems to be caused by this use of dynamic-require. Possible fixes:

We worked around this in Qi by wrapping the dynamic-require with another dynamic-require 😆 But of course, a proper fix here would be better.

For more context: Breaking Out of the Sandbox.

cc @michaelballantyne @dzoe

samth commented 5 months ago

I think just eta-expanding that function would fix this problem.