[racket-dev] okay to require rackunit in modules required at startup?

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Jun 29 02:52:47 EDT 2011

Four minutes ago, Robby Findler wrote:
> I think Eli is saying that it would create a "bad" dependency where

Yes, the "redundant" was a bad translation of something like "a
dependency we don't really need".


> "badness" isn't something that is easy to say precisely what it is,
> but the rough idea is that there is a hierarchy of modules (ie a
> grouping of modules into levels of a tree) and dependencies should
> go one direction. Making drracket require rackunit would cross this
> hierarchy with a link in the wrong direction (I think).

Well, I think that rackunit doesn't depend on drr[*] -- if that was
the case then the dependency that John wanted to add would have made
rackunit and drr interdependent, essentially making them part of a
single package -- and that would be bad since they're conceptually not
related.  So it's really best to avoid any inter-package dependencies
unless they make sense.

[*] As an example, rackunit might become dependent on drr in the
future, if it becomes a drr plugin.  The cost of that is obvious: you
need drr to use rackunit.  A possible solution to that, if it becomes
necessary, is to have another package for the plugin, one that depends
on rackunit and drr.

The fact that this is not easy to describe precisely is not new --
they're the same issues you face when you decide how to split your
code into modules, except lifted up a level.  And BTW, one thing that
we agreed on is to forbid packages from having dependency cycles --
which will likely help package organization in a similar way it helps
with modules.


> In general, we're not careful enough with the way we've organized
> the tree so things are a bit of a rat's nest. Part of the problem is
> that we don't have good tools to help us clean things up, but the
> larger problem is that we've just been growing for N years without
> spending much time cleaning up this particular aspect of things.

... and the fact that there is no organized package system to enforce
tidiness.  There's the distribution script, but that enforces very few
boundaries, and they're at a very coarse level.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.