Thanks for the report and simplification! I've pushed a repair.

At Sat, 5 Oct 2019 15:33:31 -0400, Sam Tobin-Hochstadt wrote:
> This definitely seems like a bug. Here's a smaller program that shows it:
> 
> #lang racket
> (begin-for-syntax
>   (dynamic-require 'pict/code #f))
> 
> Sam
> 
> On Sat, Oct 5, 2019 at 12:56 PM Stephen Foster <step...@thoughtstem.com> 
> wrote:
> >
> > I spent a few hours tracking down a mysterious bug.  Although I've fixed 
> > it, 
> I still don't understand it. I would appreciate some insight from those who 
> understand these things better.
> >
> > Here's the simple reproduction:
> >
> > main.rkt:
> >
> > #lang racket
> >
> > (define-syntax (test stx)
> >
> >   (dynamic-require "./other.rkt" #f)
> >
> >   #'(displayln "HI"))
> >
> > ;This is fine
> > (dynamic-require "./other.rkt" #f)
> >
> > ;This triggers the error
> > (test)
> >
> >
> > And other.rkt is simply:
> >
> > #lang racket
> >
> > (require pict/code)
> >
> > The error when running main.rkt is:
> >
> > no module instance found: #<resolved-module-path:"/Applications/Racket 
> v7.4/collects/racket/private/list.rkt"> 0
> >
> >
> >   context...:
> >
> >
> >    namespace->module-namespace82
> >
> >
> >    copy-namespace-value
> >
> >
> >    temp250
> >
> >
> >    for-loop
> >
> >
> >    [repeats 1 more time]
> >
> >
> >    perform-require!78
> >
> >
> >    /Applications/Racket 
> v7.4/share/pkgs/compatibility-lib/mzscheme/private/old-procs.rkt:47:4: 
> make-namespace
> >
> >
> >    .../racket/unit.rkt:996:20
> >
> >
> >    "/Applications/Racket v7.4/share/pkgs/pict-lib/pict/code.rkt": [running 
> body]
> >
> >
> >    temp37_0
> >
> >
> >    for-loop
> >
> >
> >    run-module-instance!125
> >
> >
> >    for-loop
> >
> >
> >    [repeats 1 more time]
> >
> >
> >    run-module-instance!125
> >
> >
> >    apply-transformer-in-context
> >
> >
> >    ...
> >
> >
> >
> >
> > It would appear that the dynamic-require of a module that requires 
> > pict/code 
> fails inside a macro, but not otherwise.  What's up with that?
> >
> > --Stephen
> >
> >
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/7acffe39-c491-4da6-b00b-2450e41f
> 5008%40googlegroups.com.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BYGMeCVCO_h_NXErf1LQWz
> NWxmBXWTQNt%3DUt2iyyVv5Yw%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/5d994668.1c69fb81.28e90.27b3SMTPIN_ADDED_MISSING%40gmr-mx.google.com.

Reply via email to