[plt-scheme] a few PLaneT updates

From: Jacob Matthews (jacobm at cs.uchicago.edu)
Date: Tue Apr 15 16:36:36 EDT 2008

There are two significant changes to PLaneT checked into SVN recently
in preparation for v4.0:

1. the new short syntax proposed a few weeks ago on this mailing list
has been adopted
2. the planet command-line tool's interface now uses a
command/subcommand-style system like the cvs or svn commandline tools

Read below for more on each of these changes.
---

NEW REQUIRE SYNTAX

In addition to the old require syntax, PLaneT requires may now take
the abbreviated syntax we discussed on this mailing list a few weeks
back. The precise syntax is the way Carl Eastlund suggested in message
<http://list.cs.brown.edu/pipermail/plt-scheme/2008-March/023747.html>:

owner/package/path -- versionless
owner/package:major/path -- major-only
owner/package:major:minor/path -- major and minor

package is the filename of a package WITHOUT the trailing ".plt" which
MUST NOT be present.
path is the filename of a file within the package WITHOUT the trailing
".ss" which MUST NOT be present. (If you omit the file path, you get
the default file main.ss.)

minor may be

  number         ; normal unqualified minor version number
  =number        ; exact minor version number match
  <=number       ; the given minor version number or less
  >=number       ; the given minor version number or greater
  number-number  ; any minor version in the given range


Some examples:

(require (planet schematics/schemeunit:2:10/test))
   corresponds to
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2 10)))

(require (planet schematics/schemeunit:2:<=10/test))
   corresponds to
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2 (- 10))))

(require (planet schematics/schemeunit:2:>=10/test))
   corresponds to
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2 (+ 10))))

(require (planet schematics/schemeunit:2:=10/test))
   corresponds to
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2 (= 10))))

(require (planet schematics/schemeunit:2:5-10/test))
   corresponds to
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2 (5 10))))

(require (planet schematics/schemeunit:2/test))
   corresponds to
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)))

(require (planet schematics/schemeunit/test))
   corresponds to
(require (planet "test.ss" ("schematics" "schemeunit.plt")))

(require (planet schematics/schemeunit))
   corresponds to
(require (planet "main.ss" ("schematics" "schemeunit.plt")))


In addition, "#lang planet" can now also accept new-style package
specifications.

----

CVS/SVN-STYLE COMMANDLINE INTERFACE

The old planet command-line tool had way too much going on for the
flag-based system to be convenient. So, I've gotten rid of all those
old flags and switches, and instead there's a two-level command
hierarchy. I think this is best explained by the command-line help, so
here's what happens when you run the commandline tool now:

;; ---
jacob-matthews-computer:~ jacobm$ planet
Usage: planet <subcommand> [option ...] <arg ...>
[note: you can name a subcommand by typing any unambiguous prefix of it.]

PLT Scheme PLaneT command-line tool. Provides commands to help you manipulate
your local planet cache.

For help on a particular subcommand, type 'planet <subcommand> --help'
Available subcommands:
  create        create a PLaneT archive from a directory
  install       download and install a given package
  remove        remove the specified package from the local cache
  show          list the packages installed in the local cache
  clearlinks    clear the linkage table, allowing upgrades
  fileinject    install a local file to the planet cache
  link          create a development link
  unlink        remove development link associated with the given package
  fetch         download a package file without installing it
  url           get a URL for the given package
  open          unpack the contents of the given package

;; ----

Comments are welcome.


-jacob


Posted on the users mailing list.