[plt-dev] Generated files and co-existing copies of DrScheme

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Wed Nov 4 16:44:06 EST 2009

Currently there are a few headaches when one tries to keep concurrent
copies of DrScheme on one machine, and I'd like to eliminate some of
them.  Essentially, problems of one sort or another arise when two
different copies of DrScheme both try to "own" the same set of
generated files.  The end result is that one copy of DrScheme ends up
reading files generated by the other, and the results become
inconsistent (usually a compilation error or inconsistent

Currently, I know of four categories of files generated by DrScheme:
the user preferences file, the planet cache, user-specific Scribble
documentation, and ZOs for user programs (including, and especially,
planet development links).

The user preferences file is fine -- I really only want one copy of that.

The planet cache can be dealt with: the PLTPLANETDIR environment
variable overrides its default location.  This is the kind of
configuration I am looking for in general.

Currently, generated Scribble documentation files go in a default
(platform-specific) place, and cannot be overridden.  As a result, if
I have two copies of, but with different planet packages
installed, my documentation will reflect only one or the other; Help
Desk in one of them will be wrong.  I'd like control over Scribble
index placement similar to the PLTPLANETDIR environment variable.

Generated files (e.g. compiled/ and doc/ subdirectories) for user code
go in whatever directory the user code lives in.  Again, as a result,
if I have code for a planet package, I can try it out in one copy of
DrScheme, but the minute I load another, it tries to read the .zo
files generated by the other and runs into problems (a compilation
error if different version numbers, goodness knows what behavior if
the same).  If there were an option to store these files in a
user-specific location (e.g. store all .zos in ~/.plt-scheme/compiled,
or at least store development link generated files in
~/.plt-scheme/planet/devel), development code could be reusable across
different copies of DrScheme.

It seems to me that resolving the issue for Scribble files, at least,
should be straightforward.  We could institute either a PLTSCRIBBLEDIR
variable for placement of the Scribble index, or PLTUSERDIR that
overrides the common parent directory of Scribble and Planet
installation.  I prefer the latter, since it would generalize to
include any other kind of generated file we come up with in the future
(or any current ones I've forgotten about).

I would also like to pick a conventional place in the PLT tree to
store this PLTUSERDIR at (similar to <PLT>/src/build for the results
of 'make') and set up a 'svn:ignore' property for it.  That way, just
as removing an old PLT trunk checkout cleans up its build/ tree, it
would also clean up planet/ and doc/ trees that are no longer needed.

The development link issue is trickier -- it's not a matter of just
setting up one environment variable to replace one (or maybe two, or
some small fixed N) hard-coded strings, but rather changing a
compilation policy for a subset of code.  I don't have a concrete
proposal here, but it's been brought up before and is a headache so I
wanted to bring up the issue for discussion.  Does anyone have a good
idea how to handle this one?

That's a bunch of issues, and three proposals: (1) set up PLTUSERDIR
to control placement of Planet and Scribble generated files, (2) pick
a conventional place in the PLT tree for users to store it who can and
wish to do so, and (3) longer term, think about a way to fit
development link code into this story.  So -- what do the rest of you
developer folks think?

Carl Eastlund

Posted on the dev mailing list.