On Wed, Jul 31, 2013 at 2:43 PM, Joe Bowser <[email protected]> wrote:

> On Wed, Jul 31, 2013 at 11:22 AM, Andrew Grieve <[email protected]>
> wrote:
> >>
> >> > That said, I'm still don't think that our mistake was anything other
> than
> >> > poor messaging / docs. 3.0 implies that breaking changes will happen.
> >>
> >> I disagree.  We should have kept the shim in so that people could
> >> easily transition from 2.9 to 3.0, as what Don said earlier.
> >>
> >
> > The transition from 2.9 to 3.0 *is* easy. You drop the .api part. Maybe
> we
> > should add this to our bin/update script?
>
> I don't think we should make our update scripts re-write Java code.
>
> >>
> >> > Another thing we could look at doing is creating a shim as a plugin.
> >> Then,
> >> > if plugins want to have their java code shared with both, they can
> >> declare
> >> > that they depend on the "2.9.0 shim plugin". We could even do the same
> >> for
> >> > the old "Plugin.java" (which is another thing we removed in 3.0)
> >>
> >> Why are you so dead set against adding a shim into core?
> >>
> >
> > I'm not dead set against it. I think we're going to run into this same
> > problem again and again though, so want to take the time to explore what
> > our options are.
> >
> > Having the shim as a plugin seems like it would be less work to push out.
> > I think though that writing such a shim is not an easy thing to do. I
> > started writing one when I made the change and gave up.
>
> What currently breaks? Aren't we just extending the existing classes
> that were there earlier?
>

The main problem I hit was that .Foo instanceof .api.Foo == false. So all
methods that require a Foo, you need to now have two methods. One that
takes .api.Foo, and one that take .Foo. You also need to ensure that
whenever you create an object, you create the .Foo version of it.


>
> > My hope is that once we have a registry, and the registry can track which
> > plugins work with which cordova versions, that it will help address this
> > problem. E.g. you'll be told "org.apache.cordova.core.File v2.0 requires
> > Cordova v3.2, you have Cordova 3.0. Use org.apache.cordova.core.File v1.3
> > instead, or upgrade your Cordova version."
>
> OK, but these are users who may not even be using plugman who are just
> copying in random Java code and expecting it to work.  I know it's
> easy to say that we shouldn't care about these users because they did
> it to themselves, but it's harder to say that when they're complaining
> to you on IRC or worse, in person.  That's why I think we should do
> the shim.
>

The answer to them would be to not upgrade to 3.0 I think. Wait for plugins
to be updated, and then update.

Reply via email to