Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-5390

Removing a plugin with multi-level dependencies does not removal all plugins

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.7.0
    • Component/s: CLI, Plugman
    • Labels:
      None

      Description

      I have 3 plugins that depend on each other. a depends on b that depends on c. a -> b -> c

      The problem is that if I install plugin a and remove it later it leaves plugin c for some reason.

      $ cordova plugin rm a
      Uninstalling 2 dangling dependent plugins.
      Uninstalling c from ios
      Uninstalling b from ios
      Preparing ios project
      Preparing ios project
      Uninstalling a from ios
      Preparing ios project
      Deleting plugin a
      Found 2 removable plugins. Deleting them.
      $ cordova plugins
      [ 'c' ]
      

      The sample plugins can be found here:
      https://github.com/marcuspridham/plugman-issue

      I'm using Cordova CLI 3.2.0-rc.1.

        Issue Links

          Activity

          Hide
          agrieve Andrew Grieve added a comment -

          confirmed this is still happening with `cordova@3.4.1-0.1.1`

          Show
          agrieve Andrew Grieve added a comment - confirmed this is still happening with `cordova@3.4.1-0.1.1`
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user bryanhiggins opened a pull request:

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

          CB-5390 Uninstall - recursively remove dependencies of dependencies

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

          $ git pull https://github.com/blackberry-webworks/cordova-lib uninstallRecursive

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

          https://github.com/apache/cordova-lib/pull/94.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 #94


          commit 784ba806724772c4af4b7ee5c4aad2ebbe08f023
          Author: Bryan Higgins <bhiggins@blackberry.com>
          Date: 2014-09-29T18:03:51Z

          CB-5390 Uninstall - recursively remove dependencies of dependencies


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user bryanhiggins opened a pull request: https://github.com/apache/cordova-lib/pull/94 CB-5390 Uninstall - recursively remove dependencies of dependencies You can merge this pull request into a Git repository by running: $ git pull https://github.com/blackberry-webworks/cordova-lib uninstallRecursive Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-lib/pull/94.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 #94 commit 784ba806724772c4af4b7ee5c4aad2ebbe08f023 Author: Bryan Higgins <bhiggins@blackberry.com> Date: 2014-09-29T18:03:51Z CB-5390 Uninstall - recursively remove dependencies of dependencies
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 9ca23557af9543a3c97ef08f282d4d9f8efe9575 in cordova-lib's branch refs/heads/master from Bryan Higgins
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=9ca2355 ]

          CB-5390 Uninstall - recursively remove dependencies of dependencies

          Show
          jira-bot ASF subversion and git services added a comment - Commit 9ca23557af9543a3c97ef08f282d4d9f8efe9575 in cordova-lib's branch refs/heads/master from Bryan Higgins [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=9ca2355 ] CB-5390 Uninstall - recursively remove dependencies of dependencies
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1df6bb67bfc8906d81cafd0f4d9c61fcacfc29c9 in cordova-lib's branch refs/heads/master from Bryan Higgins
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=1df6bb6 ]

          CB-5390 Uninstall - change order of popping top level plugin id to satisfy tests

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1df6bb67bfc8906d81cafd0f4d9c61fcacfc29c9 in cordova-lib's branch refs/heads/master from Bryan Higgins [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=1df6bb6 ] CB-5390 Uninstall - change order of popping top level plugin id to satisfy tests
          Hide
          stevegill Steve Gill added a comment -

          I am seeing weird issues since this change was implemented.

          Finished in 53.079 seconds
          722 tests, 1022 assertions, 0 failures, 0 skipped

          > cordova-lib@0.21.14-dev jshint /Users/stevengill/Documents/repo/cordova/cordova/cordova-lib/cordova-lib
          > node node_modules/jshint/bin/jshint src

          src/plugman/uninstall.js: line 100, col 9, 'plugin_et' is defined but never used.

          1 error
          npm ERR! weird error 2
          npm ERR! not ok code 0
          npm ERR! Test failed. See above for more details.
          npm ERR! not ok code 0

          When I go and remove that variable, it causes other tests to fail

          Show
          stevegill Steve Gill added a comment - I am seeing weird issues since this change was implemented. Finished in 53.079 seconds 722 tests, 1022 assertions, 0 failures, 0 skipped > cordova-lib@0.21.14-dev jshint /Users/stevengill/Documents/repo/cordova/cordova/cordova-lib/cordova-lib > node node_modules/jshint/bin/jshint src src/plugman/uninstall.js: line 100, col 9, 'plugin_et' is defined but never used. 1 error npm ERR! weird error 2 npm ERR! not ok code 0 npm ERR! Test failed. See above for more details. npm ERR! not ok code 0 When I go and remove that variable, it causes other tests to fail
          Hide
          stevegill Steve Gill added a comment -

          Actually, just tried removing it again and it worked fine this time.

          Show
          stevegill Steve Gill added a comment - Actually, just tried removing it again and it worked fine this time.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-lib/pull/94

            People

            • Assignee:
              Unassigned
              Reporter:
              mpridham Marcus Pridham
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development