[racket] Adding a raco command not working for me

From: Greg Hendershott (greghendershott at gmail.com)
Date: Mon Apr 8 08:16:37 EDT 2013

Thank you for following up.

> And, just to be sure, `raco setup frog' has no effect?

Correct, it has no effect. From subdir above frog:

$ raco setup frog
raco setup frog
raco setup: version: 5.3.3.8 [3m]
raco setup: variants: 3m
raco setup: main collects: /Users/greg/src/plt/racket/collects
raco setup: collects paths:
raco setup:   /Users/greg/Library/Racket/5.3.3.8/collects
raco setup:   /Users/greg/src/plt/racket/collects
raco setup: --- pre-installing collections ---
raco setup: --- compiling collections ---
raco setup: making: racket
raco setup: --- parallel build using 8 processes ---
raco setup: 7 making: /Users/greg/src/scheme/collects/frog/frog
raco setup: --- updating info-domain tables ---
raco setup: --- creating launchers ---
raco setup: --- building documentation ---
raco setup: --- installing collections ---
raco setup: --- post-installing collections ---

$ raco frog
raco frog
/Users/greg/src/plt/racket/bin/raco: Unrecognized command: frog

Usage: raco <command> <option> ... <arg> ...

Frequently used commands:
  docs           search and view documentation
  make           compile source to bytecode
  setup          install and build libraries and documentation
  pkg            manage packages
  link           manage library-collection directories
  planet         manage Planet package installations
  exe            create executable
  test           run tests associated with files/directories
  pack           pack files/collections into a .plt archive

A command can be specified by an unambiguous prefix.
See `raco help' for a complete list of commands.
See `raco help <command>' for help on a command.

> Installation, user, and shared package scopes all work for me, but what
> is your default package scope? (It's "user", unless you've specifically
> changed it.)

I haven't specifically changed it (AFIK).


On Sat, Apr 6, 2013 at 11:34 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Sat, 6 Apr 2013 11:19:43 -0400, Greg Hendershott wrote:
>> So on http://docs.racket-lang.org/planet2/Developing_Packages.html
>> should it switch the steps around? Folks should not run `raco pkg
>> install --link demo` until _after_ they create an info.rkt in demo?
>
> Good point! Technically, for the things in the documentation's example,
> the order doesn't matter. But swapping the order would be less
> confusing to someone who already knows about "info.rkt" files from
> other sources.
>
>
> Assuming that you have an "info.rkt" now, though, I'm puzzled that
> these steps are not working...
>
>> Because when I try to run `raco pkg install --link` now, it does
>> nothing, telling me:
>>
>> $ raco pkg install --link frog
>> raco pkg install: package is already installed
>>   package: frog
>>
>> OK. So I just tried:
>>
>> $ raco pkg remove frog
>>
>> (FYI that gives a huge amount of output, which doesn't say anything
>> about removing `frog`, but a lot about making other stuff.  But `raco
>> pkg show` confirms it was removed.)
>>
>> Next I try:
>>
>> $ raco pkg install --link frog
>>
>> And I try:
>>
>> $ raco pkg show
>>
>> <It's installed.>
>>
>> But:
>>
>> $ raco help
>>
>> Does not show my command listed.
>
> And, just to be sure, `raco setup frog' has no effect?
>
>
>> So it's still not working. From my (probably not great) understanding
>> for getinfo.rkt, I'm still not sure how it _could_ work because these
>> linked collections aren't returned by
>> `current-library-collection-paths`.
>
> The call to `current-library-collection-paths' is involved with finding
> "cache.rktd", which is an index for "info.rkt" entries. All
> installation-specific entries are indexed in the installation's
> "cache.rktd", and all user-specific entries are indexed in the
> user-specific "cache.rktd".
>
> Installation, user, and shared package scopes all work for me, but what
> is your default package scope? (It's "user", unless you've specifically
> changed it.)
>

Posted on the users mailing list.