racket / macro-debugger

Other
8 stars 16 forks source link

Copying code with the 🔒 lock icon from the Macro Stepper causes an error in DrRacket #39

Open plane opened 3 years ago

plane commented 3 years ago

Racket version Racket 8.1 BC on Windows 10

Problem description When I have code with the "armed" 🔒 icon in DrRacket's definitions window, this error appears:

read-bytes: cannot load snip-class reader, snipclass name has only one library path, but text mode requested: #"(lib \"lock.rkt\" \"macro-debugger\" \"syntax-browser\" \"icons\")"

How to reproduce Put this code into a new file in DrRacket:

#lang racket/base
🔒

When does this happen? This happens when I copy code from the Macro Stepper. For example, I have a macro which expands to the following code:

(let* ([lhs-list (list 1 (+ 2 3) 4)] [rhs-list (rest lhs-list)] [ops-list (list < <)]) 
(for/and ([lhs* (in-list 🔒lhs-list)] [rhs* (in-list 🔒rhs-list)] [op* (in-list 🔒ops-list)]) (op* lhs* rhs*)))

When I copy that expanded code back into DrRacket, the error shows up until I delete the 🔒 lock icons from the code.

Additional info This isn't a very serious problem, as DrRacket otherwise continues working fine.