cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse <purplecabb...@gmail.com>
Subject Re: Cordova 5.0.0 "duplicate cordova" check breaks Ripple
Date Mon, 04 May 2015 23:57:27 GMT
Yeah, my reasoning is that it is difficult to update all the affected bits
in cordova.  We can change the cordova logic, but still it will be at least
a week before we can get a new everything out.

Part of my reasoning is that ripple claims to be a '... platform agnostic
mobile application development and testing tool.' We should make that part
true as well.

Personally, I consider ripple's use of 'cordova' to be risky given that we
have certain expectations of how our own library works, which may or may
not be private to cordova.  I would much rather see ripple implement a
ripple-cordova connector class which uses cordova/exec/proxy or some
cordova apis that we purposely publish, which is what I plan to look into
this week. Or we can consider moving to a model where we do define a way to
override the entire cordova object, and document it.


@purplecabbage
risingj.com

On Mon, May 4, 2015 at 3:56 PM, Tim Barham <Tim.Barham@microsoft.com> wrote:

> Hey Jesse - is your reasoning behind that to avoid having to release an
> update for Cordova tools + all platforms, or because you don't want to
> change the existing Cordova logic (and if the latter, what's your concern)?
>
> Have you had any inspiration about how to fix Ripple to avoid tripping
> this? I've not been able to come up with a safe approach yet. On the other
> hand, the change in Cordova to avoid triggering this is very simple - just
> a pain that it requires releasing a bunch of updates.
>
> Tim
> ________________________________________
> From: Jesse <purplecabbage@gmail.com>
> Sent: Saturday, May 2, 2015 2:28 AM
> To: dev@cordova.apache.org
> Subject: Re: Cordova 5.0.0 "duplicate cordova" check breaks Ripple
>
> I think ripple will need to change, I'll have a look and see if there is a
> more elegant way to implement honeypot.
>
>
>
> > On Apr 30, 2015, at 7:06 PM, Tim Barham <Tim.Barham@microsoft.com>
> wrote:
> >
> > Hey everyone - a bug was filed today against Ripple that it is broken
> with
> > Cordova 5.0.0. The issue is that Ripple triggers the new "duplicate
> > cordova" check:
> >
> >     cordova-js/src/cordova.js line 22:
> >     if ("cordova" in window) { throw new Error("cordova already
> defined"); };
> >
> > Ripple patches cordova by defining a setter for window.cordova to
> > intercept it being created. This is sufficient to make ("cordova" in
> > window) return true. I don't see a way to readily resolve this issue in
> > Ripple. We can fix it in Cordova by changing the test to:
> >
> >   if (window.cordova) ...
> >
> > Couple of questions:
> > 1. Any reason not to make this change?
> > 2. To get this fix out will require re-releasing all platforms, correct?
> > And I presume a tools release to update the pinned platforms? Is this
> > sufficient reason to trigger such a release?
> >
> > Thanks!
> >
> > Tim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

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