You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/02/21 07:00:22 UTC

[jira] [Commented] (CB-10314) avoid fetching newId when oldId is already fetched

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

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

GitHub user bso-intel opened a pull request:

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

    CB-10314 avoid fetching plugins when oldId is already fetched

    implement the fix to the issue in CB-10314.
    Before start fetching the plugin, first check if the plugin with alias id is already fetched in the project.
    Otherwise, it is a waste of time fetching the plugin with newId and then decide not to install.
    This pull request also includes a fix to the issue of reporting the bogus mismatched id error which is caused by fetching the new-Id when old-Id is renamed to fetch. (checkID function in fetch.js)
    After the fix, the plugin add is changed as follows:
    {code} 
    [CB-10314] cordova plugin
    cordova-plugin-whitelist 1.2.1 "Whitelist"
    org.apache.cordova.device 0.3.0 "Device"
    [CB-10314] cordova plugin add org.apache.cordova.device
    Plugin "org.apache.cordova.device" already installed on ios.
    {code}

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

    $ git pull https://github.com/bso-intel/cordova-lib CB-10314

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

    https://github.com/apache/cordova-lib/pull/396.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 #396
    
----
commit e88e2a1050a770e594a8ac8e6b179836ca819323
Author: Byoungro So <by...@intel.com>
Date:   2016-02-21T05:48:13Z

    CB-10314 avoid fetching plugins when oldId is already fetched

----


> avoid fetching newId when oldId is already fetched
> --------------------------------------------------
>
>                 Key: CB-10314
>                 URL: https://issues.apache.org/jira/browse/CB-10314
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>            Reporter: Byoungro So
>            Assignee: Byoungro So
>            Priority: Minor
>              Labels: triaged
>
> As of Cordova 5.4.0, an old plugin id is automatically converted to a new id using the corodva-registry-mapper.
> This causes a new id to be fetched even if an old id is already fetched in the plugins directory (at cordova-lib/src/plugman/install.js)
> However, plugman/fetch.js/copyPlugin() checks if the alias id is already in the plugins directory, and skips installing the fetched newId plugin.
> This causes unnecessary overhead.
> It is better to check if the oldId is already fetched, and skips fetching the newId from the beginning.
> {code}
> [t6.0.1] cordova plugins
> cordova-plugin-whitelist 1.2.1 "Whitelist"
> org.apache.cordova.device 0.3.0 "Device"
> [t6.0.1] cordova plugin add org.apache.cordova.device
> Notice: org.apache.cordova.device has been automatically converted to cordova-plugin-device to be fetched from npm. This is due to our old plugins registry shutting down.
> Fetching plugin "cordova-plugin-device" via npm
> cordova-plugin-device" will not install due to "/Users/bso/cordova/test/t6.0.1/plugins/org.apache.cordova.device" being installed.
> Notice: org.apache.cordova.device has been automatically converted to cordova-plugin-device and fetched from npm. This is due to our old plugins registry shutting down.
> Fetching plugin "cordova-plugin-device" via npm
> cordova-plugin-device" will not install due to "/Users/bso/cordova/test/t6.0.1/plugins/org.apache.cordova.device" being installed.
> Plugin "org.apache.cordova.device" already installed on ios.
> {code}



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

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