You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2013/09/26 18:36:02 UTC

[jira] [Created] (CB-4925) CLI Doesn't fail when a dependency is not found

Andrew Grieve created CB-4925:
---------------------------------

             Summary: CLI Doesn't fail when a dependency is not found
                 Key: CB-4925
                 URL: https://issues.apache.org/jira/browse/CB-4925
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugman
            Reporter: Andrew Grieve


Repro steps:
1. create a project
2. Add a platform
3. Add a plugin to it that has a dependency on another plugin, but have the <url=".", subdir="/does/not/exist>

What happens:
1. The plugin says its installed successfully, but the dependent plugin is not installed.
2. Dependency information is not written. You can remove other dependent plugins without any warning.

What should happen:
The install should fail and be reverted.

Suggestion:
- We should fetch all dependencies before installing any of them, since fetch is an IO thing and more likely to fail.

Here's a log showing this happening when installing chrome.identity from chrome-cordova repo when it had the wrong subdir path (commit id = 6abe99705ffcf2aa42d74e22a47232b578ab95f3)

{quote}
agrieve@agrieve-macbookpro ~/tmp$ cordova create a a.b.c a
agrieve@agrieve-macbookpro ~/tmp$ cd a
agrieve@agrieve-macbookpro ~/tmp/a$ cordova platform add ios
agrieve@agrieve-macbookpro ~/tmp/a$ cordova plugin add ../../git/mobile-chrome-apps/chrome-cordova/plugins/chrome.identity --verbose
Calling plugman.fetch on plugin "../../git/mobile-chrome-apps/chrome-cordova/plugins/chrome.identity"
Fetching plugin from location "../../git/mobile-chrome-apps/chrome-cordova/plugins/chrome.identity"...
Fetch is reading plugin.xml from location "../../git/mobile-chrome-apps/chrome-cordova/plugins/chrome.identity/plugin.xml"...
Copying from location "../../git/mobile-chrome-apps/chrome-cordova/plugins/chrome.identity" to location "/Users/agrieve/tmp/a/plugins/org.chromium.identity"
Calling plugman.install on plugin "/Users/agrieve/tmp/a/plugins/org.chromium.identity" for platform "ios" with options "{"www_dir":"/Users/agrieve/tmp/a/platforms/ios/.staging/www","cli_variables":{}}"
Starting installation of "org.chromium.identity"...
Dependencies detected, iterating through them...
Dependent plugin "org.chromium.common" not fetched, retrieving then installing.
Fetching plugin from location "/Users/agrieve/git/mobile-chrome-apps/chrome-cordova/plugins/chrome-common"...
Fetch is reading plugin.xml from location "/Users/agrieve/git/mobile-chrome-apps/chrome-cordova/plugins/chrome-common/plugin.xml"...
Copying from location "/Users/agrieve/git/mobile-chrome-apps/chrome-cordova/plugins/chrome-common" to location "/Users/agrieve/tmp/a/plugins/org.chromium.common"
Starting installation of "org.chromium.common"...
Installing plugin org.chromium.common...
Beginning processing of action stack for ios project...
Parsing ios project files...
Parsing iOS project files...
Action stack processing complete.
Writing out iOS pbxproj file...
Preparing ios project...
Processing configuration changes for plugins.
Iterating over installed plugins: [ 'org.chromium.common' ]
Writing out cordova_plugins.js...
Dependent plugin "org.chromium.runtime" not fetched, retrieving then installing.
Fetching plugin from location "/Users/agrieve/git/mobile-chrome-apps/chrome-cordova/plugins/chrome-runtime"...
Fetch is reading plugin.xml from location "/Users/agrieve/git/mobile-chrome-apps/chrome-cordova/plugins/chrome-runtime/plugin.xml"...
Copying from location "/Users/agrieve/git/mobile-chrome-apps/chrome-cordova/plugins/chrome-runtime" to location "/Users/agrieve/tmp/a/plugins/org.chromium.runtime"
Starting installation of "org.chromium.runtime"...
Dependencies detected, iterating through them...
Dependent plugin "org.chromium.common" already fetched, using that version.
Starting installation of "org.chromium.common"...
Dependent plugin "org.chromium.storage" not fetched, retrieving then installing.
Fetching plugin from location "/Users/agrieve/git/mobile-chrome-apps/chrome-cordova/plugins/chrome.storage"...
Fetch is reading plugin.xml from location "/Users/agrieve/git/mobile-chrome-apps/chrome-cordova/plugins/chrome.storage/plugin.xml"...
Copying from location "/Users/agrieve/git/mobile-chrome-apps/chrome-cordova/plugins/chrome.storage" to location "/Users/agrieve/tmp/a/plugins/org.chromium.storage"
Starting installation of "org.chromium.storage"...
Dependencies detected, iterating through them...
Dependent plugin "org.chromium.common" already fetched, using that version.
Starting installation of "org.chromium.common"...
Installing plugin org.chromium.storage...
Beginning processing of action stack for ios project...
Parsing ios project files...
Parsing iOS project files...
Action stack processing complete.
Writing out iOS pbxproj file...
Preparing ios project...
Processing configuration changes for plugins.
Iterating over installed plugins: [ 'org.chromium.common', 'org.chromium.storage' ]
Writing out cordova_plugins.js...
Installing plugin org.chromium.runtime...
Beginning processing of action stack for ios project...
Parsing ios project files...
Parsing iOS project files...
Action stack processing complete.
Writing out iOS pbxproj file...
Preparing ios project...
Processing configuration changes for plugins.
Iterating over installed plugins: [ 'org.chromium.common',
  'org.chromium.storage',
  'org.chromium.runtime' ]
Writing out cordova_plugins.js...
Dependent plugin "org.apache.cordova.core.inappbrowser" not fetched, retrieving then installing.
Fetching plugin from location "/Users/agrieve/git/mobile-chrome-apps/cordova/cordova-inappbrowser"...
Dependent plugin "com.google.playservices" not fetched, retrieving then installing.
Fetching plugin from location "/Users/agrieve/git/mobile-chrome-apps/cordova/google-play-services"...
Fetch is reading plugin.xml from location "/Users/agrieve/git/mobile-chrome-apps/cordova/google-play-services/plugin.xml"...
Copying from location "/Users/agrieve/git/mobile-chrome-apps/cordova/google-play-services" to location "/Users/agrieve/tmp/a/plugins/com.google.playservices"
Starting installation of "com.google.playservices"...
Installing plugin com.google.playservices...
Beginning processing of action stack for ios project...
Parsing ios project files...
Parsing iOS project files...
Action stack processing complete.
Writing out iOS pbxproj file...
Preparing ios project...
Processing configuration changes for plugins.
Iterating over installed plugins: [ 'org.chromium.common',
  'org.chromium.storage',
  'org.chromium.runtime',
  'com.google.playservices' ]
Writing out cordova_plugins.js...
agrieve@agrieve-macbookpro ~/tmp/a$ echo $?
0
agrieve@agrieve-macbookpro ~/tmp/a$ cordova plugin rm org.chromium.common
{quote}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira