[racket-dev] raco pkg dependency checks and exit code

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Oct 3 08:52:45 EDT 2013

At Thu, 3 Oct 2013 06:45:12 -0600, Jay McCarthy wrote:
> On Wed, Oct 2, 2013 at 3:54 PM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:
> > Hi all,
> >
> > I noticed that if you don't specify any dependencies for a package, then
> > `raco` will warn you about that.  However, the exit code is 0 and it's
> > not an "error".
> >
> > Comparatively, if you supply a dependencies field of `empty`, then you
> > will get a bunch of errors about undeclared dependencies and the exit
> > code is 1.
> >
> > Is there a reason why these two cases are treated differently?
> In the first case, you are forgetting to do it and we warn to tell you
> what you should put. In the second case, you put them in but are wrong
> and should be CAUGHT and PUNISHED. I think that's the logic behind it.


My intent was to have a path from the v5.3.x world, where the
dependency on the main distribution was implicit and most packages
declared no dependencies, and the v5.90.x world, where the main
distribution is a bunch of packages and dependencies should be
declared. Initially, that difference meant that you couldn't make a
package that declared dependences and worked for both v5.3.x and

Now that the catalog at "pkg.racket-lang.org" has a mapping for each
package in the v5.90.x main distribution and points empty versions of
those packages for v5.3.x, then it could make sense to change the
no-declared-dependencies warning to an error.

Posted on the dev mailing list.