[racket] Modules and File Save Bug?

From: Sean Kanaley (skanaley at gmail.com)
Date: Sat Jun 22 15:38:41 EDT 2013

I've got it this time:

The test file with the module+ must be required by another, not even 
necessarily saved file (untitled # is fine).  It seems the tests are 
being run therefore in the *other* file, yet displayed in the current 
file's repl.

e.g.

in a.rkt:

#lang racket
(module+ test
   (write "?"))

save, then open new tab

#lang racket
(require "a.rkt")

go back to a.rkt, comment out, and it will print.  It may or may not 
print after depending on exactly which order of 
save/ctrl+r/commenting/etc. and I'm not sure what happens in general.

On 06/22/2013 03:30 PM, Robby Findler wrote:
> Oh, maybe memory got corrupted somehow earlier along the line.
>
> Just in case it is relevant: DrRacket tries hard to protect itself 
> against buggy user programs, but it cannot do that when #%foreign is 
> being used (unsafely).
>
> Robby
>
>
>
> On Sat, Jun 22, 2013 at 2:25 PM, Sean Kanaley <skanaley at gmail.com 
> <mailto:skanaley at gmail.com>> wrote:
>
>     I myself can no longer reproduce it after closing and reopening
>     DrRacket. By coincidence, before closing it, the menus stopped
>     working and I got a Ubuntu error of some sort as well.  I shall
>     keep trying for a bit.
>
>
>     On 06/22/2013 03:12 PM, Robby Findler wrote:
>>     I'm not seeing that behavior (that is a bug, tho). I tried these
>>     steps:
>>
>>     1) cmd-t to create a new tab in DrRacket.
>>     2) paste the expression above (there is an automatic "#lang
>>     racket" inserted).
>>     3) save the file.
>>     4) delete the above expression
>>     5) hit run.
>>
>>     No output observed.
>>
>>     Were you doing something differently?
>>
>>     Robby
>>
>>
>>     On Sat, Jun 22, 2013 at 2:02 PM, Sean Kanaley <skanaley at gmail.com
>>     <mailto:skanaley at gmail.com>> wrote:
>>
>>         I don't use modules very much, so this could be the defined
>>         behavior similar to how the ffi module "secretly" (it's
>>         actually documented) doesn't reload foreign libraries unless
>>         DrRacket is restarted, but I didn't notice anything in the
>>         documentation.  How to reproduce:
>>
>>         (module+ test
>>           (write "?"))
>>
>>         Without even running it, save the file, then delete that
>>         expression.  Now run it (as in ctrl+r), and it will write "?".
>>         ____________________
>>          Racket Users list:
>>         http://lists.racket-lang.org/users
>>
>>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130622/b97e7dce/attachment-0001.html>

Posted on the users mailing list.