Interesting article and discussion about Python's standard library
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Wed May 22 09:51:27 UTC 2019
On Wednesday, 22 May 2019 at 09:16:28 UTC, Ola Fosheim Grøstad
wrote:
> Plain npm usage does not seem to pull in two versions of the
> same library.
npm allows you to specify a semver range, so if the range does
not overlap then it will pull in a "duplicate". Although for
libraries that are exposed externally (like react), you can
specify that it is a peer dependency that should only exists as
one semver version. In which case it should complain.
At least, that is my shallow understanding of the system.
Allowing version 1 and 2 of a library to coexist in the same
build is no different than depending on two independent libraries
that provides the same functionality under different names.
Makes sense to allow a build to succeed if two modules depends on
two different versions of some simple set of functions.
Especially in a culture where there tends to be one function per
module.
More information about the Digitalmars-d
mailing list