Skip to content

Requiring macro debugger causes error in Scribble sandboxed evaluator #45

@countvajhula

Description

@countvajhula

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:

  • Does it need to be dynamic? A static require might avoid the problem.
  • Handle and suppress the error.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions