[racket-dev] Should `dynamic-require`d libraries be in package dependencies?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Nov 26 10:04:27 EST 2013

My position is that regardless of how a package is implemented
(whether with require, dynamic-require, etc) it should "work" after
being installed, so things that are "necessary" should be listed as
dependencies.

If a package has additional optional features that make use of other
installed packages, then they don't need to be listed even if their
absence causes a runtime exception on certain functions. For example,
I could imagine a version of the db library that didn't require every
particular db connector but would still provide the exports, but just
error. (Although in that case, I think it might be nicer for the
connector to provide db/sqlite and so on.)

Jay


On Mon, Nov 25, 2013 at 11:55 PM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:
> Hi all,
>
> Should dynamically required libraries induce a package dependency?
>
> Take for example the "xrepl-lib" package. It currently depends on five
> other packages, but I think two of them can be dropped and `raco setup`
> won't complain.
>
> On the other hand, XREPL may `dynamic-require` the macro stepper (one of
> the dependencies that can be dropped). The same is true for DrRacket
> (not listed as a dependency), but it doesn't make much sense to make the
> XREPL package depend on DrRacket.
>
> Is there a best practice for these kinds of cases yet?
>
> Cheers,
> Asumu
> _________________________
>   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

Posted on the dev mailing list.