[racket] Question/Suggestion for raco

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Wed May 30 20:24:33 EDT 2012

John Clements wrote at 05/30/2012 12:53 PM:
> Re: planet: I agree that assembling planet packages is not as smooth as it could be, but I think that the solution there is our new shiny planet replacement that I'm definitely not asking about because I don't have time to work on it :).

I think that releasing PLaneT packages can be easier with just a little 
more tool support .  The current evolutionary state of McFly (hopefully 
soon to be released) is that one starts a package by:

1. Gather together your main code and test files into .  Make sure one 
of the files is "main.rkt".

2. Copy&paste a template "info.rkt" from the McFly documentation or from 
one of your other PLaneT packages, and fill it in, to something like this:

#lang setup/infotab

(define mcfly-planet       'neil/soundex:2:0)
(define name               "soundex")
(define mcfly-subtitle     "Soundex Hashing in Racket")
(define blurb              "Soundex Hashing")
(define homepage           "http://www.neilvandyke.org/racket-soundex/")
(define mcfly-author       "Neil Van Dyke")
(define categories         '(misc))
(define scribblings        '(("doc.scrbl")))
(define can-be-loaded-with 'all)
(define mcfly-files        '("test-soundex.rkt"))
(define mcfly-license      "LGPLv3")

(define mcfly-legal
   "Copyright 2004--2012 Neil Van Dyke.  This program is Free Software; 
you can
redistribute it and/or modify it under the terms of the GNU Lesser General
Public License as published by the Free Software Foundation; either 
version 3
of the License, or (at your option) any later version.  This program is
distributed in the hope that it will be useful, but without any warranty;
without even the implied warranty of merchantability or fitness for a
particular purpose.  See http://www.gnu.org/licenses/ for details.  For 
licenses and consulting, please contact the author.")

3. Add "doc" forms to the source code files, starting with: (doc 
(section "Introduction"))

4. Do a "raco mcfly" to set up (and clean up) PLaneT development links, 
and view formatted Scribble documentation in Web browser.

5. Add more "doc" forms.

6. Do a "raco mcfly planet-package" (or "raco mcfly pp") to make a 
PLaneT package with only the appropriate files in it.  (I'm implementing 
this part right now; the other parts work.)

(Later on, I might also have a command that does the PLaneT upload for 
you.  Before adding that feature, I'll make "raco mcfly planet-package" 
also test the ".plt" file it generates, to catch problems like files not 

Notice that the only template here is for making sure you remembered all 
the important stuff in "info.rkt".  (I'm thinking of having McFly also 
programmatically update this file with default settings for the things 
you missed, but that's not a 1.0 feature.)  You don't create or edit a 
Scribble file directly, there is no Enterprise grunt directory 
structure, and the hardest IMHO part of PLaneT packages, which is 
maintaining correct PLaneT development links, is done for you.

After you upload the file to PLaneT, the next time you do a "raco mcfly" 
in that directory or one of its ancestor directories, McFly will see 
that version in PLaneT, and remove your development link.

Then, when it's time to work on the next version of your PLaneT package, 
you edit the "mcfly-planet" binding in "info.rkt", run "raco mcfly" 
again, and it makes the new development link.  Then do your coding, 
"raco mcfly planet-package" (or "raco mc pp" if you're cool), upload, 

Eventually, there can be a DrRacket add-on that provides GUi buttons and 
menu items for doing "raco mcfly" things.

Neil V.

Posted on the users mailing list.