You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Joe Bowser <bo...@gmail.com> on 2013/09/10 23:03:56 UTC

[Android] FileHelper and DirectoryManager removed, breaks two core plugins

Hey

I noticed that FileHelper and DirectoryManager were removed from the
Core cordova, and now AudioHandler and Capture no longer function. Can
we please not just move things without making sure that they aren't
plagued with dependencies and making sure the plugins are updated?
There's a reason I didn't rip these things out of Cordova earlier.

Joe

Re: [Android] FileHelper and DirectoryManager removed, breaks two core plugins

Posted by Andrew Grieve <ag...@chromium.org>.
Restored & Deprecated.


On Wed, Sep 11, 2013 at 11:07 AM, Andrew Grieve <ag...@chromium.org>wrote:

> That's good feedback. I was flip floppy about actually removing the files
> from core, but sounds like there's good reason to leave them for now. I'll
> put them back and deprecate them. Also unsure about whether it merits a
> major version bump, since these classes aren't (intentionally) a part of
> our API, but rather files that didn't get moved into the plugins in time.
>
> The copies of them in the plugins have the same name, but are in different
> packages, so they won't conflict.
>
>
>
> On Wed, Sep 11, 2013 at 9:14 AM, Ian Clelland <ic...@chromium.org>wrote:
>
>> On Wed, Sep 11, 2013 at 5:44 AM, Andrew Grieve <ag...@chromium.org>
>> wrote:
>>
>> > From your other thread, I think you figured out the case here - but the
>> > breaking case will be if you are using non-latest plugins with latest
>> > android.
>> >
>>
>> This is still a possibility -- I hit it yesterday as well, by updating one
>> repo and not the other.
>>
>> Given that the core and the plugins are separated now, the API surface is
>> even more of a contract than it was before, and I think we need to be more
>> careful about trying to make coordinated changes between plugins and core.
>>
>> I would have liked to have seen the symbols moved into the plugin, under a
>> different name, and then, only later (say, with the next major release of
>> Cordova) have the old symbols removed. We could annotate them as
>> deprecated
>> in the meantime to inform anyone else using them.
>>
>> It's slower, but it won't break things. (As often, at least). And the
>> stability should help with developer confidence that we won't continue to
>> have breaking changes in Cordova with every monthly release.
>>
>> Ian
>>
>>
>> > This *does* mean that when we release 3.1, it will require that users
>> > update some of their plugins if they haven't already. I think this is
>> > reasonable though?
>> >
>> >
>> > On Tue, Sep 10, 2013 at 5:03 PM, Joe Bowser <bo...@gmail.com> wrote:
>> >
>> > > Hey
>> > >
>> > > I noticed that FileHelper and DirectoryManager were removed from the
>> > > Core cordova, and now AudioHandler and Capture no longer function. Can
>> > > we please not just move things without making sure that they aren't
>> > > plagued with dependencies and making sure the plugins are updated?
>> > > There's a reason I didn't rip these things out of Cordova earlier.
>> > >
>> > > Joe
>> > >
>> >
>>
>
>

Re: [Android] FileHelper and DirectoryManager removed, breaks two core plugins

Posted by Andrew Grieve <ag...@chromium.org>.
On Wed, Sep 11, 2013 at 11:14 AM, Joe Bowser <bo...@gmail.com> wrote:

> On Wed, Sep 11, 2013 at 8:07 AM, Andrew Grieve <ag...@chromium.org>
> wrote:
> > That's good feedback. I was flip floppy about actually removing the files
> > from core, but sounds like there's good reason to leave them for now.
> I'll
> > put them back and deprecate them. Also unsure about whether it merits a
> > major version bump, since these classes aren't (intentionally) a part of
> > our API, but rather files that didn't get moved into the plugins in time.
> >
>
> Whoa.  Back when we were working on 3.0, these were supposed to be
> shared classes, and now they're plugins?  I remember not moving them
> out because I guessed that something like this would happen.
>
Are there any of them that you think should still be part of the core API?



>
> > The copies of them in the plugins have the same name, but are in
> different
> > packages, so they won't conflict.
> >
>
> They also might not be able to be dexed after they're compiled into
> Java bytecode, like when the namespace for FileUtils was changed.
> This was something that caught a few people off guard.  I think we
> should keep this change, but that this is actually more about our
> process than about moving things around.  We should be able to do
> these changes without it taking three hours for someone to clean their
> stuff if they had the misfortune of going to a business meeting that
> day of the change.
>

I've seen this kind of error when two files implement the same class in the
same package, but I've not seen it for classes of the same name in
different packages.

Re: [Android] FileHelper and DirectoryManager removed, breaks two core plugins

Posted by Joe Bowser <bo...@gmail.com>.
On Wed, Sep 11, 2013 at 8:07 AM, Andrew Grieve <ag...@chromium.org> wrote:
> That's good feedback. I was flip floppy about actually removing the files
> from core, but sounds like there's good reason to leave them for now. I'll
> put them back and deprecate them. Also unsure about whether it merits a
> major version bump, since these classes aren't (intentionally) a part of
> our API, but rather files that didn't get moved into the plugins in time.
>

Whoa.  Back when we were working on 3.0, these were supposed to be
shared classes, and now they're plugins?  I remember not moving them
out because I guessed that something like this would happen.

> The copies of them in the plugins have the same name, but are in different
> packages, so they won't conflict.
>

They also might not be able to be dexed after they're compiled into
Java bytecode, like when the namespace for FileUtils was changed.
This was something that caught a few people off guard.  I think we
should keep this change, but that this is actually more about our
process than about moving things around.  We should be able to do
these changes without it taking three hours for someone to clean their
stuff if they had the misfortune of going to a business meeting that
day of the change.

Re: [Android] FileHelper and DirectoryManager removed, breaks two core plugins

Posted by Andrew Grieve <ag...@chromium.org>.
That's good feedback. I was flip floppy about actually removing the files
from core, but sounds like there's good reason to leave them for now. I'll
put them back and deprecate them. Also unsure about whether it merits a
major version bump, since these classes aren't (intentionally) a part of
our API, but rather files that didn't get moved into the plugins in time.

The copies of them in the plugins have the same name, but are in different
packages, so they won't conflict.


On Wed, Sep 11, 2013 at 9:14 AM, Ian Clelland <ic...@chromium.org>wrote:

> On Wed, Sep 11, 2013 at 5:44 AM, Andrew Grieve <ag...@chromium.org>
> wrote:
>
> > From your other thread, I think you figured out the case here - but the
> > breaking case will be if you are using non-latest plugins with latest
> > android.
> >
>
> This is still a possibility -- I hit it yesterday as well, by updating one
> repo and not the other.
>
> Given that the core and the plugins are separated now, the API surface is
> even more of a contract than it was before, and I think we need to be more
> careful about trying to make coordinated changes between plugins and core.
>
> I would have liked to have seen the symbols moved into the plugin, under a
> different name, and then, only later (say, with the next major release of
> Cordova) have the old symbols removed. We could annotate them as deprecated
> in the meantime to inform anyone else using them.
>
> It's slower, but it won't break things. (As often, at least). And the
> stability should help with developer confidence that we won't continue to
> have breaking changes in Cordova with every monthly release.
>
> Ian
>
>
> > This *does* mean that when we release 3.1, it will require that users
> > update some of their plugins if they haven't already. I think this is
> > reasonable though?
> >
> >
> > On Tue, Sep 10, 2013 at 5:03 PM, Joe Bowser <bo...@gmail.com> wrote:
> >
> > > Hey
> > >
> > > I noticed that FileHelper and DirectoryManager were removed from the
> > > Core cordova, and now AudioHandler and Capture no longer function. Can
> > > we please not just move things without making sure that they aren't
> > > plagued with dependencies and making sure the plugins are updated?
> > > There's a reason I didn't rip these things out of Cordova earlier.
> > >
> > > Joe
> > >
> >
>

Re: [Android] FileHelper and DirectoryManager removed, breaks two core plugins

Posted by Ian Clelland <ic...@chromium.org>.
On Wed, Sep 11, 2013 at 5:44 AM, Andrew Grieve <ag...@chromium.org> wrote:

> From your other thread, I think you figured out the case here - but the
> breaking case will be if you are using non-latest plugins with latest
> android.
>

This is still a possibility -- I hit it yesterday as well, by updating one
repo and not the other.

Given that the core and the plugins are separated now, the API surface is
even more of a contract than it was before, and I think we need to be more
careful about trying to make coordinated changes between plugins and core.

I would have liked to have seen the symbols moved into the plugin, under a
different name, and then, only later (say, with the next major release of
Cordova) have the old symbols removed. We could annotate them as deprecated
in the meantime to inform anyone else using them.

It's slower, but it won't break things. (As often, at least). And the
stability should help with developer confidence that we won't continue to
have breaking changes in Cordova with every monthly release.

Ian


> This *does* mean that when we release 3.1, it will require that users
> update some of their plugins if they haven't already. I think this is
> reasonable though?
>
>
> On Tue, Sep 10, 2013 at 5:03 PM, Joe Bowser <bo...@gmail.com> wrote:
>
> > Hey
> >
> > I noticed that FileHelper and DirectoryManager were removed from the
> > Core cordova, and now AudioHandler and Capture no longer function. Can
> > we please not just move things without making sure that they aren't
> > plagued with dependencies and making sure the plugins are updated?
> > There's a reason I didn't rip these things out of Cordova earlier.
> >
> > Joe
> >
>

Re: [Android] FileHelper and DirectoryManager removed, breaks two core plugins

Posted by Andrew Grieve <ag...@chromium.org>.
>From your other thread, I think you figured out the case here - but the
breaking case will be if you are using non-latest plugins with latest
android.

This *does* mean that when we release 3.1, it will require that users
update some of their plugins if they haven't already. I think this is
reasonable though?


On Tue, Sep 10, 2013 at 5:03 PM, Joe Bowser <bo...@gmail.com> wrote:

> Hey
>
> I noticed that FileHelper and DirectoryManager were removed from the
> Core cordova, and now AudioHandler and Capture no longer function. Can
> we please not just move things without making sure that they aren't
> plagued with dependencies and making sure the plugins are updated?
> There's a reason I didn't rip these things out of Cordova earlier.
>
> Joe
>