[racket-dev] experience using the `pkg` branch

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Thu Jun 13 17:56:52 EDT 2013

As part of my experiment in creating a different split of the
repository into packages, I spent some time working with the new setup
for building Racket, and cut myself on many of it's rough edges.  Some
of these are about the package system in general, and some are about
the new repository and build infrastructure.

* When there's an installation error, it's really hard to tell what
state you're in, or what you should do to fix it.  Usually, the
package manager just says that it's already installed.

This is a general issue in the package system, and it's easily the
most significant problem I encountered. The package system decides
that something is installed very early, and many errors are possible
after that. If the package didn't build, or it's dependencies didn't
build, or any of many other things happened, the package system thinks
everything is ok.

* The error message when you look for a missing collection is really
long if you have a lot of packages installed

* Using parallel make, ie `make -j 8` doesn't work from the new
top-level Makefile.

* Even though unix systems don't use them, the extra libraries are
downloaded and packaged up on unix platforms while building.

* When installing a package with a long chain of dependencies, this
message gets printed a lot:

The following packages are listed as dependencies, but are not
currently installed,
so they will be automatically installed:
    at-exp-lib syntax-color
The following packages are listed as dependencies, but are not
currently installed,
so they will be automatically installed:
    parser-tools

and so on ...

We should just collect all the packages to be installed and print them
all at once (and perhaps prompt, the way `apt-get` does).

* I think it's possible to confuse the local catalog by moving
directories around in the `pkg` directory.

* `make local-catalog` is not incremental -- it always re-downloads
and re-packs the external libraries.

* Sometimes, errors can be hard to trace to a particular package.  For
example, this one was because there was a mistake in the
future-visualizer package info.rkt file.  But I had to go groveling in
/var/tmp/ to figure that out.

/var/tmp/pkg13711534991371153499937/info.rkt::212: read: expected a closing '"'
  context...:
   /home/samth/tmp/pkg-racket/racket/lib/collects/syntax/module-reader.rkt:176:17:
body
   /home/samth/tmp/pkg-racket/racket/lib/collects/syntax/module-reader.rkt:173:2:
wrap-internal
   lang:read
   /home/samth/tmp/pkg-racket/racket/lib/collects/setup/getinfo.rkt:50:8: temp32
   /home/samth/tmp/pkg-racket/racket/lib/collects/setup/getinfo.rkt:37:0:
get-info/full/ext
   /home/samth/tmp/pkg-racket/racket/lib/collects/setup/getinfo.rkt:33:0
   /home/samth/tmp/pkg-racket/racket/lib/collects/pkg/lib.rkt:1274:0:
pkg-single-collection85

Other errors are also hard to track down. In general, it would be very
helpful to catch setup errors and report them based on the package
being installed and/or the collection being set up.

Sam

Posted on the dev mailing list.