<div dir="ltr">If you want your tool to be in the submodule named main, your definition of raco-commands should be:<br><br>(define raco-commands '(("frog" (submod frog main) "run Frog" #f)))<br></div>
<div class="gmail_extra"><br clear="all"><div>Carl Eastlund</div>
<br><br><div class="gmail_quote">On Mon, Apr 8, 2013 at 10:37 PM, Greg Hendershott <span dir="ltr"><<a href="mailto:greghendershott@gmail.com" target="_blank">greghendershott@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ah. You mean I need an info.rkt for the package, and _another_ one for<br>
the frog collection? That seems obvious now that you say it, but I<br>
hadn't realized that. So: info.rkt files are used both for packages<br>
and collections.<br>
<br>
Thank you.<br>
<br>
My next dumb question: My frog.rkt has the command-line "main"-ish<br>
functionality in a `(module+ main ...)` [1]. But raco doesn't seem to<br>
find/run that.<br>
<br>
On a hunch I moved the main-ish stuff out into the frog.rkt file<br>
module. Now raco does execute it. But that way, it runs always -- even<br>
if I'm e.g. executing the `test` module with raco test.<br>
<br>
Is this as-intended, or am I making another mistake preventing raco<br>
from running it inside `(module+ main ...)`?<br>
<br>
[1]: <a href="https://github.com/greghendershott/frog/blob/master/frog.rkt#L1162" target="_blank">https://github.com/greghendershott/frog/blob/master/frog.rkt#L1162</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Mon, Apr 8, 2013 at 6:52 PM, Matthew Flatt <<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>> wrote:<br>
> Here's a thought:<br>
><br>
> At Sat, 6 Apr 2013 10:21:53 -0400, Greg Hendershott wrote:<br>
>> I'm trying to add a raco command, following<br>
>> <a href="http://docs.racket-lang.org/raco/command.html" target="_blank">http://docs.racket-lang.org/raco/command.html</a><br>
>><br>
>> My info.rkt is simply this:<br>
>><br>
>> #lang setup/infotab<br>
>> (define deps (list "markdown" "rackjure"))<br>
>> (define raco-commands '(("frog" frog "run Frog" #f)))<br>
><br>
> That `deps' line makes sense for a package. That is, it makes sense in<br>
> "frog/info.rkt", where "frog" is the package.<br>
><br>
> The `raco-commands' line makes sense for a collection. That is, it<br>
> makes sense in "frog/frog/info.rkt".<br>
><br>
> Which path are you using for "info.rkt"?<br>
><br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br>
</div></div></blockquote></div><br></div>