[racket-dev] another Planet2 Express memo
Good news, everyone! I've improved the top-level makefile in a way that
probably breaks your existing repo checkout. Then again, there's a
chance that things will appear to work for now, delaying problems until
sometime later.
To avoid problems, delete "racket/lib/links.rktd" and
"racket/lib/pkgs". Read on if you care about the details.
The default `make' target now recognizes the `PKGS' definition to
select a set of packages from the "pkgs" directory to be linked for
development mode. This lets you create a development-mode build using
less than the full set of packages. For example,
make PKGS="gui-lib"
creates a build that links only the package "gui-lib" and its
dependencies.
Formerly, since all packages from "pkgs" were always linked, `make'
could update each existing link based on whether its package was still
in place. That strategy doesn't work as well when only a subset of
packages are meant to be installed and `PKGS' or dependencies can
change --- especially when you install your own installation-wide links
for other packages (e.g., "sirmail", in my case).
The new strategy is to keep all links installed by `make' in a separate
installed-package database. When you run `make', it puts the database
of package links in "racket/lib/devel-pkgs", and it writes
"racket/etc/config.rktd" to add suitable search paths. When you re-run
`make', it throws away the old directory and recreates the set of
links. Any other packages or links that you install in normal
installation-wide mode are unaffected.
When you run `raco pkg show' after a clean build, you'll see something
like this:
..../racket/lib/devel-pkgs:
Package[*=auto] Checksum Source
at-exp-lib* #f (link ..../pkgs/racket-pkgs/at-exp-lib)
compatibility-lib* #f (link ..../pkgs/compatibility-lib)
data-lib* #f (link ..../pkgs/data-lib)
draw-lib* #f (link ..../pkgs/draw-pkgs/draw-lib)
...
Installation-wide:
[none]
User-specific, all-version:
[none]
User-specific, version-specific (5.3.900.2):
[none]
which shows that the links are installed in a
"..../racket/lib/devel-pkgs" scope.
If you start from an old build, then you're going to see something more
like this:
..../racket/lib/devel-pkgs:
Package[*=auto] Checksum Source
at-exp-lib* #f (link ..../pkgs/racket-pkgs/at-exp-lib)
compatibility-lib* #f (link ..../pkgs/compatibility-lib)
data-lib* #f (link ..../pkgs/data-lib)
draw-lib* #f (link ..../pkgs/draw-pkgs/draw-lib)
...
Installation-wide:
at-exp-lib #f (link ..../pkgs/racket-pkgs/at-exp-lib)
compatibility-lib #f (link ..../pkgs/compatibility-lib)
data-lib #f (link ..../pkgs/data-lib)
draw-lib #f (link ..../pkgs/draw-pkgs/draw-lib)
....
User-specific, all-version:
[none]
User-specific, version-specific (5.3.900.2):
[none]
which shows that many packages are links in two different scopes. The
"Installation-wide" scope takes precedence --- and that's fine until
package move around long enough that the installation-scope links go
bad, since they aren't updated anymore by `make'. So, remove all of the
"Installation-wide" links, probably by deleting the file and directory
as suggested near the top of this message.