[racket] Adding a raco command not working for me

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Apr 6 10:47:14 EDT 2013

At Sat, 6 Apr 2013 10:21:53 -0400, Greg Hendershott wrote:
> I'm trying to add a raco command, following
> http://docs.racket-lang.org/raco/command.html
> 
> My info.rkt is simply this:
> 
>     #lang setup/infotab
>     (define deps (list "markdown" "rackjure"))
>     (define raco-commands '(("frog" frog "run Frog" #f)))
> 
> I'm trying to do this for a collection installed using `raco pkg
> install --link`, to try it out and test it. However my command doesn't
> seem to be recognized by raco.

That should work.

Here's what I tried:

 * Created a directory "demo".

 * Created a subdirectory "demo/demo".

 * Added "demo/demo/setup.rkt" as

    #lang setup/infotab
    (define raco-commands '(("demo" demo "run Demo" #f)))

 * Added "demo/demo/main.rkt" as

    #lang racket/base
    'Demo!

 * Installed with `raco pkg install --link demo'

    [This step internally runs `raco setup demo', which registers the
     `raco-commands 'spec of "info.rkt" and makes the `raco demo'
     command available.]

 * Ran `raco demo' => got "'Demo!" as output.

Since it's not working for you, I wonder what `raco setup frog' says.
Does it seem to set up the `frog' collection? And does `raco frog' work
afterward?


Posted on the users mailing list.