[racket-dev] [racket/typed-racket] 3e45f2: Adjust TR test package dependencies

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Dec 17 11:28:54 EST 2014

At Wed, 17 Dec 2014 10:38:59 -0500, Asumu Takikawa wrote:
> On 2014-12-17 08:22:33 -0700, Matthew Flatt wrote:
> > Commit 134f793 moved files out of a directory named "tests". By
> > default, a directory named "tests" is treated specially by the
> > dependency checker, reflecting that the directory name is treated
> > specially for the creation of "binary" and "binary library" variants of
> > a package: Unless the "info.rkt" file says otherwise, anything in
> > "tests" is treated as "build-time" code, and so the directory's content
> > creates build dependencies, not general dependencies.
> >
> > That's why it was sufficient to list "unstable-flonum-lib" in
> > `build-deps` before commit 134f793, and why "unstable-flonum-lib" had
> > to be moved to `deps` afterward.
> Thanks Matthew, that clears it up. Is this documented anywhere in the
> pkg docs? I looked in section 5 of the package docs which says that
> "tests" folders are pruned for binary packages, but I'm not sure if that
> implies that the dependency checker treats it as "build-time" code.

The `build-deps` field for "info.rkt" is defined in terms of binary
packages. The documentation there could draw out some of the
implications, such as the possibility of listing packages in
`build-deps` instead of `deps` when they're used only within files in
"tests" or "scribblings" subdirectories and those subdirectories are
treated in the default way. Is that what you had in mind?

Or maybe the issue is that the dependency checking performed by `raco
setup` is in some sense unspecified. The `deps` and `build-deps` fields
are defined in terms of how the package system uses them for installing
additional packages. The checking performed by `raco setup` is separate
and `lint`-like: it find apparent mismatches between dependency
declarations and implementation references, but there's no guarantee
that all problems are found or that apparent mismatches are actual. The
`raco setup` docs could use a section that describes more precisely how
dependencies are checked.

Posted on the dev mailing list.