You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Chris Brody <ch...@gmail.com> on 2018/11/20 17:37:58 UTC

[dev] Cordova config.xml vs package.json?

My understanding is that Cordova 8 is using both config.xml and
package.json. Any plugins and platforms specified in config.xml will be
automatically added in package.json if not already there. My understanding
is that Cordova will drop config.xml in a new release, forget if this was
planned for Cordova 9 or not.

Can anyone confirm the following:

Do we plan to drop config.xml support in Cordova 9? If so, any pointers to
where this was discussed and agreed?

If not, do we plan to drop config.xml support in some other future Cordova
release? Any pointers to the discussion?

Re: [dev] Cordova config.xml vs package.json?

Posted by Jan Piotrowski <pi...@gmail.com>.
It is important to note here to the casual observer, that of course
not _all_ configuration will be moved to package.json - only the stuff
that fits there better.
Darryl explained that above, this is mainly about moving the
"dependency" definitions right now - the rest will stay unchanged.

-J
Am Do., 29. Nov. 2018 um 00:23 Uhr schrieb Chris Brody <ch...@gmail.com>:
>
> I was a bit too negative about the migration. I am +100 for keeping
> plugin & platform package version specs in one place, being
> package.json, and it would be nice to migrate at least some other
> project configuration info to the same place.
>
> It would be nice if we can find a way to improve the readability and
> user-friendliness in the process somehow. I find YAML a bit easier to
> read and work with but it looks like way more trouble than it would be
> worth.
>
> I hope I will get a chance to contribute to ongoing work on GitHub,
> cannot make any promise right now.
> On Mon, Nov 26, 2018 at 12:54 PM Chris Brody <ch...@gmail.com> wrote:
> >
> > I'm gonna downvote a complete migration to package.json for the
> > following reasons:
> > * JSON makes it harder to add items to the end of lists due to
> > trailing comma rules
> > * possible interference with npm
> > * plugins which I think are a key part of Cordova, with custom plugins
> > needed by many app developers, are not configured by package.json and
> > I think should not be configured by package.json
> >
> > Probably best to stick with XML. YAML would be nice but probably too
> > much effort
> > On Tue, Nov 20, 2018 at 1:21 PM Chris Brody <ch...@gmail.com> wrote:
> > >
> > > Thanks Darryl for the detailed explanation. Do you mind if we would raise a new issue in <https://github.com/apache/cordova/issues> so that we can track and discuss this idea in one place?
> > >
> > > (I think we don't really use cordova-discuss any more, and the existing cordova-common PR does not look like the right place to track and discuss.)
> > >
> > > In general I would not favor considering this idea for Cordova 9, would be happy to give my reasons on GitHub.
> > >
> > > I think it would be best if you would be willing to raise the new issue. I would also be happy to raise the issue if needed.
> > >
> > > On Tue, Nov 20, 2018 at 12:52 PM Darryl Pogue <dv...@gmail.com> wrote:
> > >>
> > >> It's not quite as simple as dropping config.xml. In all cases,
> > >> config.xml will still need to exist to provide configuration
> > >> information about the app.
> > >>
> > >> Historically, when installing platforms and plugins with `--save`,
> > >> they were added to config.xml. When running `cordova prepare`, it
> > >> would read config.xml and restore any that were listed.
> > >> Now that we're using npm for all of our fetching, it makes more sense
> > >> to store those platform/plugin dependencies in package.json.
> > >>
> > >> Relevant proposals:
> > >> https://github.com/apache/cordova-discuss/blob/master/proposals/save-restore.md
> > >> https://github.com/apache/cordova-discuss/pull/53
> > >>
> > >> Currently, Cordova will attempt to use both package.json and
> > >> config.xml, and mirror installed plugins to both locations.
> > >> Unfortunately, handling of the spec value seems to be buggy depending
> > >> on which location it reads from.
> > >>
> > >> It would be great if Cordova 9 could drop the code that mirrors
> > >> changes to config.xml and use only package.json, but nobody has really
> > >> started work on that yet. The closest is an unfinished helper class
> > >> that I was hoping to add to cordova-common to assist with package.json
> > >> changes: https://github.com/apache/cordova-common/pull/34
> > >>
> > >> I was also kinda hoping that this could all be tackled as part of the
> > >> `cordova install` proposal, but it probably makes sense to handle it
> > >> in smaller pieces.
> > >>
> > >>
> > >> On Tue, Nov 20, 2018 at 9:38 AM Chris Brody <ch...@gmail.com> wrote:
> > >> >
> > >> > My understanding is that Cordova 8 is using both config.xml and
> > >> > package.json. Any plugins and platforms specified in config.xml will be
> > >> > automatically added in package.json if not already there. My understanding
> > >> > is that Cordova will drop config.xml in a new release, forget if this was
> > >> > planned for Cordova 9 or not.
> > >> >
> > >> > Can anyone confirm the following:
> > >> >
> > >> > Do we plan to drop config.xml support in Cordova 9? If so, any pointers to
> > >> > where this was discussed and agreed?
> > >> >
> > >> > If not, do we plan to drop config.xml support in some other future Cordova
> > >> > release? Any pointers to the discussion?
> > >>
> > >> ---------------------------------------------------------------------
> > >> 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
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: [dev] Cordova config.xml vs package.json?

Posted by Chris Brody <ch...@gmail.com>.
I was a bit too negative about the migration. I am +100 for keeping
plugin & platform package version specs in one place, being
package.json, and it would be nice to migrate at least some other
project configuration info to the same place.

It would be nice if we can find a way to improve the readability and
user-friendliness in the process somehow. I find YAML a bit easier to
read and work with but it looks like way more trouble than it would be
worth.

I hope I will get a chance to contribute to ongoing work on GitHub,
cannot make any promise right now.
On Mon, Nov 26, 2018 at 12:54 PM Chris Brody <ch...@gmail.com> wrote:
>
> I'm gonna downvote a complete migration to package.json for the
> following reasons:
> * JSON makes it harder to add items to the end of lists due to
> trailing comma rules
> * possible interference with npm
> * plugins which I think are a key part of Cordova, with custom plugins
> needed by many app developers, are not configured by package.json and
> I think should not be configured by package.json
>
> Probably best to stick with XML. YAML would be nice but probably too
> much effort
> On Tue, Nov 20, 2018 at 1:21 PM Chris Brody <ch...@gmail.com> wrote:
> >
> > Thanks Darryl for the detailed explanation. Do you mind if we would raise a new issue in <https://github.com/apache/cordova/issues> so that we can track and discuss this idea in one place?
> >
> > (I think we don't really use cordova-discuss any more, and the existing cordova-common PR does not look like the right place to track and discuss.)
> >
> > In general I would not favor considering this idea for Cordova 9, would be happy to give my reasons on GitHub.
> >
> > I think it would be best if you would be willing to raise the new issue. I would also be happy to raise the issue if needed.
> >
> > On Tue, Nov 20, 2018 at 12:52 PM Darryl Pogue <dv...@gmail.com> wrote:
> >>
> >> It's not quite as simple as dropping config.xml. In all cases,
> >> config.xml will still need to exist to provide configuration
> >> information about the app.
> >>
> >> Historically, when installing platforms and plugins with `--save`,
> >> they were added to config.xml. When running `cordova prepare`, it
> >> would read config.xml and restore any that were listed.
> >> Now that we're using npm for all of our fetching, it makes more sense
> >> to store those platform/plugin dependencies in package.json.
> >>
> >> Relevant proposals:
> >> https://github.com/apache/cordova-discuss/blob/master/proposals/save-restore.md
> >> https://github.com/apache/cordova-discuss/pull/53
> >>
> >> Currently, Cordova will attempt to use both package.json and
> >> config.xml, and mirror installed plugins to both locations.
> >> Unfortunately, handling of the spec value seems to be buggy depending
> >> on which location it reads from.
> >>
> >> It would be great if Cordova 9 could drop the code that mirrors
> >> changes to config.xml and use only package.json, but nobody has really
> >> started work on that yet. The closest is an unfinished helper class
> >> that I was hoping to add to cordova-common to assist with package.json
> >> changes: https://github.com/apache/cordova-common/pull/34
> >>
> >> I was also kinda hoping that this could all be tackled as part of the
> >> `cordova install` proposal, but it probably makes sense to handle it
> >> in smaller pieces.
> >>
> >>
> >> On Tue, Nov 20, 2018 at 9:38 AM Chris Brody <ch...@gmail.com> wrote:
> >> >
> >> > My understanding is that Cordova 8 is using both config.xml and
> >> > package.json. Any plugins and platforms specified in config.xml will be
> >> > automatically added in package.json if not already there. My understanding
> >> > is that Cordova will drop config.xml in a new release, forget if this was
> >> > planned for Cordova 9 or not.
> >> >
> >> > Can anyone confirm the following:
> >> >
> >> > Do we plan to drop config.xml support in Cordova 9? If so, any pointers to
> >> > where this was discussed and agreed?
> >> >
> >> > If not, do we plan to drop config.xml support in some other future Cordova
> >> > release? Any pointers to the discussion?
> >>
> >> ---------------------------------------------------------------------
> >> 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


Re: [dev] Cordova config.xml vs package.json?

Posted by Chris Brody <ch...@gmail.com>.
I'm gonna downvote a complete migration to package.json for the
following reasons:
* JSON makes it harder to add items to the end of lists due to
trailing comma rules
* possible interference with npm
* plugins which I think are a key part of Cordova, with custom plugins
needed by many app developers, are not configured by package.json and
I think should not be configured by package.json

Probably best to stick with XML. YAML would be nice but probably too
much effort
On Tue, Nov 20, 2018 at 1:21 PM Chris Brody <ch...@gmail.com> wrote:
>
> Thanks Darryl for the detailed explanation. Do you mind if we would raise a new issue in <https://github.com/apache/cordova/issues> so that we can track and discuss this idea in one place?
>
> (I think we don't really use cordova-discuss any more, and the existing cordova-common PR does not look like the right place to track and discuss.)
>
> In general I would not favor considering this idea for Cordova 9, would be happy to give my reasons on GitHub.
>
> I think it would be best if you would be willing to raise the new issue. I would also be happy to raise the issue if needed.
>
> On Tue, Nov 20, 2018 at 12:52 PM Darryl Pogue <dv...@gmail.com> wrote:
>>
>> It's not quite as simple as dropping config.xml. In all cases,
>> config.xml will still need to exist to provide configuration
>> information about the app.
>>
>> Historically, when installing platforms and plugins with `--save`,
>> they were added to config.xml. When running `cordova prepare`, it
>> would read config.xml and restore any that were listed.
>> Now that we're using npm for all of our fetching, it makes more sense
>> to store those platform/plugin dependencies in package.json.
>>
>> Relevant proposals:
>> https://github.com/apache/cordova-discuss/blob/master/proposals/save-restore.md
>> https://github.com/apache/cordova-discuss/pull/53
>>
>> Currently, Cordova will attempt to use both package.json and
>> config.xml, and mirror installed plugins to both locations.
>> Unfortunately, handling of the spec value seems to be buggy depending
>> on which location it reads from.
>>
>> It would be great if Cordova 9 could drop the code that mirrors
>> changes to config.xml and use only package.json, but nobody has really
>> started work on that yet. The closest is an unfinished helper class
>> that I was hoping to add to cordova-common to assist with package.json
>> changes: https://github.com/apache/cordova-common/pull/34
>>
>> I was also kinda hoping that this could all be tackled as part of the
>> `cordova install` proposal, but it probably makes sense to handle it
>> in smaller pieces.
>>
>>
>> On Tue, Nov 20, 2018 at 9:38 AM Chris Brody <ch...@gmail.com> wrote:
>> >
>> > My understanding is that Cordova 8 is using both config.xml and
>> > package.json. Any plugins and platforms specified in config.xml will be
>> > automatically added in package.json if not already there. My understanding
>> > is that Cordova will drop config.xml in a new release, forget if this was
>> > planned for Cordova 9 or not.
>> >
>> > Can anyone confirm the following:
>> >
>> > Do we plan to drop config.xml support in Cordova 9? If so, any pointers to
>> > where this was discussed and agreed?
>> >
>> > If not, do we plan to drop config.xml support in some other future Cordova
>> > release? Any pointers to the discussion?
>>
>> ---------------------------------------------------------------------
>> 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


Re: [dev] Cordova config.xml vs package.json?

Posted by Chris Brody <ch...@gmail.com>.
Thanks Darryl for the detailed explanation. Do you mind if we would raise a
new issue in <https://github.com/apache/cordova/issues> so that we can
track and discuss this idea in one place?

(I think we don't really use cordova-discuss any more, and the existing
cordova-common PR does not look like the right place to track and discuss.)

In general I would not favor considering this idea for Cordova 9, would be
happy to give my reasons on GitHub.

I think it would be best if you would be willing to raise the new issue. I
would also be happy to raise the issue if needed.

On Tue, Nov 20, 2018 at 12:52 PM Darryl Pogue <dv...@gmail.com> wrote:

> It's not quite as simple as dropping config.xml. In all cases,
> config.xml will still need to exist to provide configuration
> information about the app.
>
> Historically, when installing platforms and plugins with `--save`,
> they were added to config.xml. When running `cordova prepare`, it
> would read config.xml and restore any that were listed.
> Now that we're using npm for all of our fetching, it makes more sense
> to store those platform/plugin dependencies in package.json.
>
> Relevant proposals:
>
> https://github.com/apache/cordova-discuss/blob/master/proposals/save-restore.md
> https://github.com/apache/cordova-discuss/pull/53
>
> Currently, Cordova will attempt to use both package.json and
> config.xml, and mirror installed plugins to both locations.
> Unfortunately, handling of the spec value seems to be buggy depending
> on which location it reads from.
>
> It would be great if Cordova 9 could drop the code that mirrors
> changes to config.xml and use only package.json, but nobody has really
> started work on that yet. The closest is an unfinished helper class
> that I was hoping to add to cordova-common to assist with package.json
> changes: https://github.com/apache/cordova-common/pull/34
>
> I was also kinda hoping that this could all be tackled as part of the
> `cordova install` proposal, but it probably makes sense to handle it
> in smaller pieces.
>
>
> On Tue, Nov 20, 2018 at 9:38 AM Chris Brody <ch...@gmail.com> wrote:
> >
> > My understanding is that Cordova 8 is using both config.xml and
> > package.json. Any plugins and platforms specified in config.xml will be
> > automatically added in package.json if not already there. My
> understanding
> > is that Cordova will drop config.xml in a new release, forget if this was
> > planned for Cordova 9 or not.
> >
> > Can anyone confirm the following:
> >
> > Do we plan to drop config.xml support in Cordova 9? If so, any pointers
> to
> > where this was discussed and agreed?
> >
> > If not, do we plan to drop config.xml support in some other future
> Cordova
> > release? Any pointers to the discussion?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Re: [dev] Cordova config.xml vs package.json?

Posted by Darryl Pogue <dv...@gmail.com>.
It's not quite as simple as dropping config.xml. In all cases,
config.xml will still need to exist to provide configuration
information about the app.

Historically, when installing platforms and plugins with `--save`,
they were added to config.xml. When running `cordova prepare`, it
would read config.xml and restore any that were listed.
Now that we're using npm for all of our fetching, it makes more sense
to store those platform/plugin dependencies in package.json.

Relevant proposals:
https://github.com/apache/cordova-discuss/blob/master/proposals/save-restore.md
https://github.com/apache/cordova-discuss/pull/53

Currently, Cordova will attempt to use both package.json and
config.xml, and mirror installed plugins to both locations.
Unfortunately, handling of the spec value seems to be buggy depending
on which location it reads from.

It would be great if Cordova 9 could drop the code that mirrors
changes to config.xml and use only package.json, but nobody has really
started work on that yet. The closest is an unfinished helper class
that I was hoping to add to cordova-common to assist with package.json
changes: https://github.com/apache/cordova-common/pull/34

I was also kinda hoping that this could all be tackled as part of the
`cordova install` proposal, but it probably makes sense to handle it
in smaller pieces.


On Tue, Nov 20, 2018 at 9:38 AM Chris Brody <ch...@gmail.com> wrote:
>
> My understanding is that Cordova 8 is using both config.xml and
> package.json. Any plugins and platforms specified in config.xml will be
> automatically added in package.json if not already there. My understanding
> is that Cordova will drop config.xml in a new release, forget if this was
> planned for Cordova 9 or not.
>
> Can anyone confirm the following:
>
> Do we plan to drop config.xml support in Cordova 9? If so, any pointers to
> where this was discussed and agreed?
>
> If not, do we plan to drop config.xml support in some other future Cordova
> release? Any pointers to the discussion?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org