[racket] Understanding raco make and its correctness guarantees

From: Kieron Hardy (kieron.hardy at gmail.com)
Date: Mon Mar 25 18:53:07 EDT 2013

On Mar 21, 2013, at 9:55, Greg Hendershott <greghendershott at gmail.com> wrote:

> FWIW I recall getting confused by this too. (But unlike you, I haven't
> detoured at the time to figure out exactly what's going on; instead
> I've resorted to `rm -rf compiled/` and resumed whatever I was trying
> to get done).

FWIW-2 .. I have also been caught out with this, and I also just delete the 'compiled' directories and move on. The first time I had this issue, I recall it taking quite some time of fruitless debugging before I thought of cleaning out the old compiles.  

>> So the take away is that if I want my running system to represent the
>> current state of the source files I either need to run raco make every
>> single time, or never run raco make. That seems very counter
>> intuitive.
> 
> If that's the status quo, even just knowing so clearly is helpful.
> E.g. if `raco make` docs had a big, "Tip: If you _ever_ use raco make,
> _always_ use it, else delete compiled/".

+1

In addition, an option to 'raco make' to remove old compiles would be nice, something like 'raco make --clean'. I do see an earlier list posting requesting the same functionality, and also see 'raco setup --clean' which might be usable.

Another option to 'raco make' to show what 'raco make' would do without actually doing it might also be quite useful.

> I think a contributing factor for me was that in DrRacket it "just
> works", for the reason Robby explained, so later I expected
> command-line racket to just-work, too.

Here, my experience differs. I recall having problems that were fixed by deleting the 'compiled' directories, both from within DrRacket and at the command-line (and IIRC also with the program produced with 'raco exe'). However, these were all on Windows and there might have been other things in play. Again, I just deleted the 'compiled' directories and moved on without looking into it any deeper.

Kieron.



Posted on the users mailing list.