[racket-dev] possible bug possibly involving planet development link requires

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Mon Dec 27 04:58:34 EST 2010

In case anyone masochistically-inclined wants to investigate a possible 
bug possibly involving PLaneT requires, or has heard a report of a bug 
like this but not been able to reproduce...

I don't want to overstate the importance.  I doubt that I'll see this 
problem again.  It could just be a freak problem with my system and not 
a bug.  Or it might be pilot error, especially given the late hour.

0. Use DrRacket 5.0.2.

1. I had PLaneT development link for package "me/lib:1:=1".

2. Package "me/lib" has a "main.ss" file that does: (require "lib.ss") 
(provide (all-from-out "lib.ss"))

3. In new file "use.rkt", there is a use of syntax "libform" and a 
require to get it: (require (planet me/lib:1:=1))

4. When running "use.rkt", get an error about "libform" not defined.  
It's defined in "lib.ss", but not provided.

5. Add provide of "libform" to "lib.ss".

6. Attempt to run "use.rkt", but it is still complaining that "libform" 
not defined.  THIS IS A CONFUSING FAILURE.

7. Spend 15 minutes trying in vain to get "use.rkt" to recognize 
"libform" from "lib.ss", by editing both files and trying many attempts 
to run, including restarting DrRacket.  Also attempt to reproduce the 
problem with minimal test case, but fail to reproduce.

8. Finally try changing the require form from "me/lib:1:=1" and 
"me/lib:1:=1/lib.ss".  THIS WORKS.

9. Change the require form back to "me/lib:1:=1", which hadn't been 
working up through moments earlier, but now works. THIS IS A CONFUSING 
SUCCESS.

I'm wondering whether there was a cache of compiled code or some kind of 
name resolution/linkage (PLaneT-related, or not) that was out of date 
for some reason.  (Note that I might have done a CVS commit of "lib.ss" 
at some point in there, and it looks like my clock is approx. 2 seconds 
behind server's.)  And perhaps asking for a different file in the PLaneT 
require caused that cache to be updated?

-- 
http://www.neilvandyke.org/


Posted on the dev mailing list.