[racket-dev] PLaneT(2): Single vs multi-collection packages
On Fri, Jun 7, 2013 at 2:49 PM, Greg Hendershott
<greghendershott at gmail.com> wrote:
>> I am *very* strongly in favor of this -- I'd rather have
>> single-collection packages than multi-collection packages, if forced
>> to choose. I'm very glad that you and Laurent have done the work here.
>>
>> I'd be happy to update all of my packages. Currently, of my 9
>> packages on pkg.racket-lang.org, 8 are single collection, and 1
>> splices into the existing `data` collection (and has a second
>> collection to work around a now-fixed limitation.
>
> Likewise I'd be happy to update all of mine.
>
>
> As I thought about this, I realized I have what feels like a _really_
> dumb question. I realize maybe I don't have a crisp handle on
> "collection", "library", "module", and "subdirectory".
(require a/b/c x/y/z)
A collection is something that comes first in a require: a and x.
A library normally means module, but might be a general term for "code I share".
A module path is the full path: a/b/c and x/y/z.
A module is a file: "a/b/c.rkt" and "x/y/z.rkt"
A module has a 'short name': 'c and 'z (but you normally don't think about it.)
A subdirectory is where a file might be and shows up in the module path.
A package is a set of modules.
Some documentation might refer to subdirectories as "sub collections".
This whole debate has been about whether a SINGLE package can have
MANY modules from DIFFERENT collections.
Can package "P" have module a/b/c AND x/y/z?
Does package "P" have to have a collection "P"?
The current package system puts no restriction on what modules a
package can have in it.
The proposed patch supported vigorously by Sam is to restrict some
packages so that the can only have modules from one collection. Since
this restriction is only on some packages, it doesn't take power from
the system. And some people believe that this restriction is more
convenient, because they do not have to come up with a name for P or a
directory for it. There is a second debate on the point of whether the
collection name of a restricted package P must be P.
Jay
> A single collection can have multiple modules, correct? At what point
> does it become "multiple collections" -- simply because some of the
> modules are in subdirs?
>
> In other words:
>
> my-collection/
> subidr1/
> subdir2/
>
> Is that 1 collection or 3? And why?
>
> Is the answer related to whether there's an info.rkt in a subdir?
>
> The discussion at http://docs.racket-lang.org/guide/module-basics.html
> doesn't clear this up for me (unless I'm overlooking something on
> multiple re-reads). 6.1.1. has an example of modules organized in
> subdirs. This feels like "one collection" but the term hasn't been
> introduced yet. 6.1.2 starts talking about library collections, and
> says "A collection is a set of installed library modules". But it
> doesn't say "modules only in the same directory", and it doesn't
> really explain at what point it would be considered separate sets of
> modules, i.e. two collections instead of one.
>
> Again, I feel like I'm being dense and will probably be embarrassed
> when I hear the answer, but ... there. I asked.
> _________________________
> Racket Developers list:
> http://lists.racket-lang.org/dev
--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay
"The glory of God is Intelligence" - D&C 93