And just to confirm that this is related to re-expansion, I can
duplicate the error by just calling `expand` twice on the file:

#lang racket

(define the-prog
  (file->value "namespace-mismatch.rkt"))
(current-namespace (make-base-namespace))

(expand (expand the-prog))

~Leif Andersen


On Fri, Feb 2, 2018 at 1:15 PM, Leif Andersen <l...@leifandersen.net> wrote:
> Oh interesting. This even happens when DrRacket has debugging turned
> off, which seems to indicate that its not a problem with errortrace,
> but a bug in the expander that shows up when using the sort of
> re-expansion technique that both DrRacket and errortrace use.
>
> ~Leif Andersen
>
>
> On Fri, Feb 2, 2018 at 1:00 PM, Michael Ballantyne
> <michael.ballant...@gmail.com> wrote:
>> An even slightly smaller version is attached.
>>
>> On Thursday, February 1, 2018 at 6:23:36 PM UTC-5, Leif Andersen wrote:
>>>
>>> And one more time, after manually expanding what require/expose does,
>>> it looks like its the dynamically adding a binding into the module's
>>> namespace that is messing it up. Micheal Ballentyne points out that
>>> this error does not occur in Racket 7, even when using errortrace. So
>>> I'm not sure if this is a bug in Racket 6, or an intended behavior.
>>>
>>> ~Leif Andersen
>>>
>>>
>>> On Thu, Feb 1, 2018 at 5:54 PM, Leif Andersen <le...@leifandersen.net>
>>> wrote:
>>> > OH, also, I should mention that it only breaks when using errortrace.
>>> > Running it without errortrace seems to work.
>>> >
>>> > ~Leif Andersen
>>> >
>>> >
>>> > On Thu, Feb 1, 2018 at 5:49 PM, Leif Andersen <le...@leifandersen.net>
>>> > wrote:
>>> >> FWIW, I've managed to shrink the example down even more. Now you only
>>> >> need module*, and expose, and two begin-for-syntax blocks after that.
>>> >>
>>> >> ~Leif Andersen
>>> >>
>>> >>
>>> >> On Thu, Feb 1, 2018 at 5:33 PM, 'William J. Bowman' via Racket
>>> >> Developers <racke...@googlegroups.com> wrote:
>>> >>> I've encountered a weird bug in DrRacket (I think).
>>> >>> I've reproduced the bug in 6.10.1.2 and git HEAD
>>> >>> (02f61622838ff28d447a76c344fe9e117ab5a306).
>>> >>>
>>> >>> Attached are two files that differ only in the order of two
>>> >>> definitions.
>>> >>> One produces a namespace mismatch error in DrRacket, the other does
>>> >>> not.
>>> >>> Neither produces an error when running the files in any other way,
>>> >>> such as in the emacs mode or on the
>>> >>> commandline.
>>> >>>
>>> >>> The key ingredients appear to be:
>>> >>> 1. Use require/expose from rackunit-lib
>>> >>> 2. Define a macro that uses a phase-1 identifier
>>> >>> 3. Define the phase-1 identifiers *after* defining the macro
>>> >>>
>>> >>> --
>>> >>> William J. Bowman
>>> >>>
>>> >>> --
>>> >>> You received this message because you are subscribed to the Google
>>> >>> Groups "Racket Developers" group.
>>> >>> To unsubscribe from this group and stop receiving emails from it, send
>>> >>> an email to racket-dev+...@googlegroups.com.
>>> >>> To post to this group, send email to racke...@googlegroups.com.
>>> >>> To view this discussion on the web visit
>>> >>> https://groups.google.com/d/msgid/racket-dev/20180201223310.GO14189%40williamjbowman.com.
>>> >>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Racket Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to racket-dev+unsubscr...@googlegroups.com.
>> To post to this group, send email to racket-dev@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/racket-dev/fbc1b9de-e34b-49d7-9686-e7aabb9a8fd4%40googlegroups.com.
>>
>> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-dev+unsubscr...@googlegroups.com.
To post to this group, send email to racket-dev@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/CAAVaeED8WXBt6GgjyS0uzU_PUsVQDKjHJUvuo7j-cSGuvUT-Vw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to