[ 
https://issues.apache.org/jira/browse/CB-11589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15379874#comment-15379874
 ] 

ASF GitHub Bot commented on CB-11589:
-------------------------------------

GitHub user dpogue opened a pull request:

    https://github.com/apache/cordova-lib/pull/464

    CB-11589: Fix missing plugin files after restore

    This avoid running prepare unnecessarily when restoring platforms as part 
of a prepare. This solves warnings about plugins already being installed, is a 
performance improvement, and fixes the weird case where I was getting an empty 
ios.json file after restoring plugins.
    
    One thing that isn't clear to me is why `options.save` gets passed through 
the restore process. Restore is, by definition, adding stuff that has already 
been saved, so there should be no case in which that ever saves new 
platforms/plugins to config.xml?
    
    /cc @vladimir-kotikov @riknoll @stevengill 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dpogue/cordova-lib restore-install

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-lib/pull/464.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #464
    
----
commit 80e93313a4f27ea987adff2270b50994edd762dd
Author: Darryl Pogue <[email protected]>
Date:   2016-07-15T18:23:27Z

    CB-11589: Fix missing plugin files after restore

----


> Missing plugins in PlatformJson after restore
> ---------------------------------------------
>
>                 Key: CB-11589
>                 URL: https://issues.apache.org/jira/browse/CB-11589
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>    Affects Versions: 6.2.0
>            Reporter: Darryl Pogue
>
> My project has both Android and iOS platforms, and sometimes when I run 
> {{cordova prepare}} it installs everything properly for Android, and installs 
> the plugin files for iOS but leaves the ios.json file mostly empty.
> It turns out we're incredibly inefficient with restoring platforms and 
> plugins. The entire process looks something like this:
> {code}
> Cordova Prepare
>   restore Android
>     Android install new plugins
>     Android prepare
>   restore iOS
>     iOS install new plugins
>     iOS prepare
>   prepare Android
>   prepare iOS
>   restore Plugins
>     add plugin
>     add plugin
>     ...
> {code}
> Rather than preparing when we add the platform and then preparing again after 
> all the platforms are added, it would be ideal to add the platforms and then 
> do a single prepare at the end.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to