[racket] info.rkt planet-version variable?

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Wed Jan 4 22:23:03 EST 2012

Regarding motivation and model... The "info.rkt" variable I suggest is 
primarily for reliability and error-checking, and secondarily for ease 
of access by tools.

Programmers specifying "require"s among multiple interacting PLaneT 
packages, or documenting history of a package, need to talk about PLaneT 
versions.  The PLaneT linkage table, the PLaneT development links, the 
PLaneT server's database-- these have information about PLaneT versions, 
are relatively hidden/opaque (compared to being able to just see the 
correct version in a file in the directory you're in), and the first two 
can be very fragile (use a different machine, run from a different 
account, upgrade your Racket version, or make a pilot error in a very 
error-prone process, and poof!).

So I've switched to making the explicit specification in "info.rkt" be 
the arbiter for the PLaneT package developer, having a tool that 
enforces and automates this for the directories with which the developer 
is concerned at the moment, and raising errors/warnings when 
"info.rkt"'s belief cannot be reconciled with the beliefs of others 
(e.g., say, the PLaneT server, as you are about to do an upload).

Regarding naming... I'm open to other names.  "planet-version" seemed 
unambiguous enough to me in context, and some other "info.rkt" variables 
are similarly terse.  "expected-planet-version" would be a more 
descriptive name.  Either name would be fine with me, or maybe someone 
can suggest a better name if the idea sounds good to them.

Ryan Culpepper wrote at 01/04/2012 01:03 PM:
> It sounds like a bad idea to me. Calling it 'planet-version' makes it 
> sound like it answers the question "who am I?", but the planet/version 
> library already provides a way to do that that avoids the obligation 
> of manually updating the definition after (or is it before?) every 
> release to PLaneT. If the intent is instead "who am I meant to be?", 
> say as a hint to a link manager, the name should reflect that.
> Ryan
> On 01/04/2012 01:48 AM, Neil Van Dyke wrote:
>> Would it be a good idea to officially add to "info.rkt" a
>> "planet-version" variable, which indicates that the directory tree
>> corresponds to a particular PLaneT package and version?
>> For example:
>> (define planet-version 'joebob/soundex:1:=2)
>> The "=" in this example is optional.
>> I currently use an unofficial variable like this (called
>> "mcfly-planet"), in generating PLaneT package documentation, and for
>> managing development links. I plan to also use this variable for making
>> uploads to PLaneT with some safety checks.
>> Perhaps other tools would also like to use this information. And perhaps
>> they'd prefer to use an official variable, not an ad-hoc variable that's
>> named specific to my documentation tool.
>> If there's going to be an official "planet-version" variable, I'd like
>> to start using it. Or I can keep using "mcfly-planet" or something
>> unofficial-looking like that.


Posted on the users mailing list.