[racket] standard-module-name-resolver: contract violation

From: Laurent (laurent.orseau at gmail.com)
Date: Sun Nov 11 09:29:12 EST 2012

Happened to me again, but this time it's not related to #%foreign:
standard-module-name-resolver: contract violation
  expected: module-path?
  given: ''(#%utils)

Strangely, this #%utils is not a module that I require directly or even
indirectly (the dependency browser does not show any 'utils' module, even
when showing all libs), and it does not happen on the same file as last
time.
Note the doubled single-quote this time.
I think (but I'm not sure), that this #%utils comes from a different file
that is opened in my DrRacket session (namely x11-racket/x11 that requires
x11-racket/utils). Closing x11-racket/x11 does not solve the problem. But
from the command line still no problem.

Aha! I seem to have found a workaround: Close DrRacket, delete the compiled
directory, then re-open DrRacket and the file, run it, and it works.

I still have no idea how to reproduce the bug though.

Laurent



On Thu, Nov 8, 2012 at 5:02 PM, Laurent <laurent.orseau at gmail.com> wrote:

>
>
>>  On some occasions, drracket won't compile my file, and prints an error:
>>>
>>> standard-module-name-resolver: contract violation
>>>   expected: module-path?
>>>   given: '(#%foreign)
>>>
>>>
>>
>> Wait, but this doesn't look right anyway, because '(#%foreign) is a list.
>>  So that may be a type error somewhere.  Have you seen it happen under
>> Racket 5.3.1 already?
>>
>
> Yes it is in 5.3.1
>
> I haven't encountered this yet.  Being able to reproduce the error would
>> be a great start in debugging this.
>>
>
> I agree, but I don't know what causes it or when it happens.
> Now I'm running the same code on a different machine and the above error
> does not appear.
>
> Laurent
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121111/407b01b4/attachment.html>

Posted on the users mailing list.