You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by marcuspridham <gi...@git.apache.org> on 2015/08/31 18:24:46 UTC

[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

GitHub user marcuspridham opened a pull request:

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

    CB-8993 Plugin restore ignores search path

    When restoring a platform the search path needs to be provided otherwise
    plugins will always be resolved to npm.

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

    $ git pull https://github.com/marcuspridham/cordova-lib CB-8993

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

    https://github.com/apache/cordova-lib/pull/292.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 #292
    
----
commit 9b840b20c5983aec6d7e4aea7e181644158a5856
Author: Marcus Pridham <ma...@sap.com>
Date:   2015-08-31T16:08:58Z

    CB-8993 Plugin restore ignores search path
    
    When restoring a platform the search path needs to be provided otherwise
    plugins will always be resolved to npm.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Re: [GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by Jesse <pu...@gmail.com>.
Confirmed here: https://people.apache.org/committer-index.html
Middle name and all ...


My team is hiring!
@purplecabbage
risingj.com

On Fri, Sep 4, 2015 at 4:36 PM, marcuspridham <gi...@git.apache.org> wrote:

> Github user marcuspridham commented on the pull request:
>
>     https://github.com/apache/cordova-lib/pull/292#issuecomment-137878645
>
>     Yep.  I signed the ICLA awhile ago.  I have done some pull requests to
> Cordova before.
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastructure@apache.org or file a JIRA ticket
> with INFRA.
> ---
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by marcuspridham <gi...@git.apache.org>.
Github user marcuspridham commented on the pull request:

    https://github.com/apache/cordova-lib/pull/292#issuecomment-137878645
  
    Yep.  I signed the ICLA awhile ago.  I have done some pull requests to Cordova before.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-lib/pull/292#issuecomment-136471159
  
    Thanks for suggesting these changes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-lib/pull/292#issuecomment-137912540
  
    CB-9560 is merged as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by marcuspridham <gi...@git.apache.org>.
Github user marcuspridham closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-lib/pull/292#issuecomment-136775078
  
    LGTM !! will be merged in.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/292#discussion_r38340821
  
    --- Diff: cordova-lib/src/cordova/prepare.js ---
    @@ -56,7 +56,7 @@ function prepare(options) {
         var hooksRunner = new HooksRunner(projectRoot);
         return hooksRunner.fire('before_prepare', options)
         .then(function(){
    -        return restore.installPlatformsFromConfigXML(options.platforms);
    +        return restore.installPlatformsFromConfigXML(options.platforms, { searchpath : options.searchpath });
    --- End diff --
    
    I don't see this searchpath ption being used by [the downstream function]( https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/restore-util.js#L35 ).



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-lib/pull/292#issuecomment-137877915
  
    @marcuspridham , did you sign the [ICLA](http://www.apache.org/licenses/#clas) ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-lib/pull/292#issuecomment-137895107
  
    #merged !


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-lib/pull/292#issuecomment-136472329
  
    Thanks for suggesting these changes. 
    
    However, I have a suggestion :
    As it currently stands, it seems like adding adding a platform or restoring from config.xml is broken.
    It doesn't handle cases where the searchpath comes from config.json or the case when the searchpath could be an array of multiple paths.
    
    I propose we include that fix with this one. What do you think ?
    
    For references, see : [Handling searchpaths as string or array](https://github.com/apache/cordova-lib/blob/41765f1fd7393be1fff2b39ba7cf00b5bf6f1ef1/cordova-lib/src/cordova/plugin.js#L97).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by marcuspridham <gi...@git.apache.org>.
Github user marcuspridham commented on the pull request:

    https://github.com/apache/cordova-lib/pull/292#issuecomment-137896650
  
    Thanks! Please look at merging CB-9560 when you time.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-lib/pull/292#issuecomment-136774986
  
    Awesome, Thanks for validating. 
    The case where we specify a searchpath on the CLI and another one in the ./cordova/config.json doesn't go through. I will open up a separate issue for that.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by marcuspridham <gi...@git.apache.org>.
Github user marcuspridham commented on the pull request:

    https://github.com/apache/cordova-lib/pull/292#issuecomment-136482068
  
    Thanks.  I just tried these cases it appears to already work. The search path provided with prepare passes through https://github.com/apache/cordova-lib/blob/41765f1fd7393be1fff2b39ba7cf00b5bf6f1ef1/cordova-lib/src/cordova/plugin.js#L97 before a plugin is added so it is always processed to handle config.json and multiple paths.
    
    I tried these cases they all appear to work for me.
    
    1. Restore plugins using plugin_search_path in .cordova/config.json.
    2. Restore plugins using combination of plugin_search_path and cli provided search path.  One plugin located in each location.
    3. Restore plugins using 2 search paths on cli.  cordova prepare --searchpath ../plugin_cache:../plugin_cache_2/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/292#discussion_r38341095
  
    --- Diff: cordova-lib/src/cordova/prepare.js ---
    @@ -56,7 +56,7 @@ function prepare(options) {
         var hooksRunner = new HooksRunner(projectRoot);
         return hooksRunner.fire('before_prepare', options)
         .then(function(){
    -        return restore.installPlatformsFromConfigXML(options.platforms);
    +        return restore.installPlatformsFromConfigXML(options.platforms, { searchpath : options.searchpath });
    --- End diff --
    
    Oops never mind, I see the changes you have made to restore-utils.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-lib pull request: CB-8993 Plugin restore ignores search pa...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-lib/pull/292#issuecomment-137896168
  
    #merged !
    Please, close this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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