[racket] raco pkg install with zipfile

From: Tony Garnock-Jones (tonyg at ccs.neu.edu)
Date: Sat May 31 11:09:31 EDT 2014

Hi Matthew, all,

On 2014-05-31 2:24 AM, Matthew Flatt wrote:
> Unfortunately, there's a mismatch between the way GitHub packages a
> ".zip" and the way `raco pkg install` uses it. The GitHub-generated
> ".zip" file has an extra directory layer relative to the layout that
> `raco pkg install` expects.

My mistake. I had been led to believe by [1] that the extra directory
layer was somehow being magically dealt with for single-collection
packages, and that therefore it was weird that multi-collection packages
weren't working the same way.

Having just tried the instructions from [1] with a single-collection
package, it actually doesn't work in that case either :-)

Could raco go hunting in the tarball/directory/whatever for an info.rkt
file that could orient it to the intended layout of the package?

I'm guessing "not right now", since supplying an info.rkt for a package
is currently optional. And there's no way of distinguishing info.rkt
files for packages from info.rkt files for collections.

If packages were required to be a little more self-describing, a few of
the heuristics around package installation (e.g. the -n flag to raco pkg
install, and the possibility of an extra directory layer) could be
dispensed with.

Both Python and node.js (pip and npm, respectively) require at least a
package name and version in their mandatory package metadata, and this
serves them well. [2,3]

Cheers,
  Tony

[1] http://lists.racket-lang.org/users/archive/2014-April/061965.html
[2] https://docs.python.org/2/distutils/apiref.html
[3] https://www.npmjs.org/doc/json.html


Posted on the users mailing list.