cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Braden Shepherdson <>
Subject Re: Platform update and breaking plug-ins
Date Thu, 06 Feb 2014 16:21:47 GMT
I continue to feel that the right approach to platform updates is mostly to
keep making platforms/ a build artifact, and largely plugins/ too.

I feel that the right thing for an app developer to do for updating
platforms would be to backup the entire project, empty out platforms/ and
plugins/, and add them both back.

What I'd really like is for them to `cordova create ...`, copy in
config.xml and www/, `cordova platform add ...`, `cordova plugin add
--from-config`, and off you go. If there's nothing project-specific in
those directories, then they can be replaced as above.

Note that `plugin add --from-config` doesn't exist, but I'd like it to, so
that you can easily install plugins which are listed in your (top-level)
config.xml. Then you can specify version constraints, like >= 2.4 && < 3,
which will (assuming we semver properly) prevent you from picking up any
broken changes until you're ready to do so.

Of course I'm speaking normatively about what I'd like to see; the current
upgrade situation is quite a bit uglier.


On Thu, Feb 6, 2014 at 11:12 AM, Josh Soref <> wrote:

> So, we discovered that a number of plugins are misusing an API in our
> platform (exec). We changed the implementation, and this broke the plug-ins
> which were expecting different but not promised behavior.
> There's a cordova-cli platform update command, which is supposed to update
> your platform, but it doesn't seem fair consider whether a platform could
> be incompatible with a plug-in.
> I'm considering having platform update have a way to check the installed
> plugins and fail if they fit certain criteria. Does anyone have an opinion
> on this?
> Another approach would be for the platform update command to be able to
> automatically update plugins (it should update them first, ideally to a
> version compatible with both the old and new platform ; if it plans to
> update after the platform and it's interrupted, then you can easily end up
> with broken plugins).
> There is a before platform update hook available - although it isn't
> documented at:
> ‎
> I will file a bug and patch for this...
> I don't think that it would help. It would require a plug-in to know in
> advance that it's buggy, which is unlikely. Knowing about bugs is more the
> job of a registry (
> Sent from my BlackBerry 10 smartphone on the Bell network.

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