cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Blotsky <>
Subject [DISCUSS] Dependency Hell
Date Sat, 05 Dec 2015 03:20:07 GMT
Hey folks,

I feel like we're in a bit of a dependency hell, and I feel that it's because there are two
distinct worlds of Cordova that use the same version space: the run-time world, and the CLI-time
world. For example a runtime change in Windows that bumps cordova-windows from 4.x to 5.x
also bumps the tools from 5.x to 6.x, even though nothing changed as far as the tools are

Our current dependency chain works (and correct me if I'm wrong) this way (where "->" means
"depend on"):

Plugins -> Platforms and Tools
Tools -> Platforms and cordova-common
Platforms -> cordova-common

I'm at a loss about how we restructure dependencies such that version updates don't cascade
up the dependency chain. Moreover, cordova-common seems like a trap: platforms can *still*
have different cordova-common versions and then we have all sorts of fun bugs. It seems like
the easiest thing to do is to make the CLI work with *everything* and stand alone, and then
to only leave these dependencies:

Plugins -> Platforms
Platforms -> cordova-common

That way the CLI only needs to change when we see it doesn't work, not when versions of things
change. That is, the CLI changes as it pleases, never explicitly "pinning" anything, and the
"plugin/platform add" commands can do their magic to make sure  they fetch compatible versions.

Another note here is this: since we're already specifying versions for platforms and plugins,
can't we just put them into the package.json of an app and then just get "plugin/platform
add" install from local node_modules by default?

This is just my take on the problem. What do you folks think?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message