Skip to content

Remote dependencies are ignored #246

Closed

Description

@d-sci

I have two packages hosted remotely, where testpkg2 relies on testpkg1. Following this vignette, I listed the remote dependency under the "Remotes" section of my DESCRIPTION file. However, when installing testpkg2, it appears that no effort is made to install its remote dependency testpkg1.

To be clear, my DESCRIPTION file for testpkg2 looks like this:

Package: testpkg2
Type: Package
Title: What the Package Does (Title Case)
Version: 0.1.0
Author: Who wrote it
Maintainer: The package maintainer <yourself@somewhere.net>
Description: More about what it does (maybe more than one line)
    Use four spaces when indenting paragraphs within the Description.
License: FILE
Encoding: UTF-8
LazyData: true
Imports: 
    testpkg1
Remotes:
    url::https://github.bdap.enernoc.net/David-Simons/testpkg1/archive/master.zip

When I try to install it (without first installing testpkg1 myself), I get an error:

Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true")
remotes::install_github("David-Simons/testpkg2", host="github.bdap.enernoc.net/api/v3")
#> Downloading GitHub repo David-Simons/testpkg2@master
#> Skipping 1 packages not available: testpkg1
#> Installing 1 packages: testpkg1
#> Installing package into 'C:/Users/David.simons/Documents/R/win-library/3.5'
#> (as 'lib' is unspecified)
#> Warning: package 'testpkg1' is not available (for R version 3.5.1)
#>   
  
  
   checking for file 'C:\Users\David.simons\AppData\Local\Temp\RtmpmCNutw\remotes2f40976e84\David-Simons-testpkg2-c34a897/DESCRIPTION' ...
  
   checking for file 'C:\Users\David.simons\AppData\Local\Temp\RtmpmCNutw\remotes2f40976e84\David-Simons-testpkg2-c34a897/DESCRIPTION' ... 
  
v  checking for file 'C:\Users\David.simons\AppData\Local\Temp\RtmpmCNutw\remotes2f40976e84\David-Simons-testpkg2-c34a897/DESCRIPTION' (405ms)
#> 
  
  
  
-  preparing 'testpkg2':
#>    checking DESCRIPTION meta-information ...
  
   checking DESCRIPTION meta-information ... 
  
v  checking DESCRIPTION meta-information
#> 
  
  
  
-  checking for LF line-endings in source and make files and shell scripts
#> 
  
-  checking for empty or unneeded directories
#> 
  
  
  
-  building 'testpkg2_0.1.0.tar.gz'
#> 
  
   
#> 
#> Installing package into 'C:/Users/David.simons/Documents/R/win-library/3.5'
#> (as 'lib' is unspecified)
#> Warning in i.p(...): installation of package 'C:/Users/DAVID~1.SIM/AppData/
#> Local/Temp/RtmpmCNutw/file2f405b32cd/testpkg2_0.1.0.tar.gz' had non-zero
#> exit status

I also tried making a testpkg3 which lists the same Remote dependency but does not include it under "Imports". i.e.:

Package: testpkg3
Type: Package
Title: What the Package Does (Title Case)
Version: 0.1.0
Author: Who wrote it
Maintainer: The package maintainer <yourself@somewhere.net>
Description: More about what it does (maybe more than one line)
    Use four spaces when indenting paragraphs within the Description.
License: FILE
Encoding: UTF-8
LazyData: true
Remotes:
    url::https://github.bdap.enernoc.net/David-Simons/testpkg1/archive/master.zip

This installs fine, but does not also install testpkg1:

remotes::install_github("David-Simons/testpkg3", host="github.bdap.enernoc.net/api/v3")
#> Downloading GitHub repo David-Simons/testpkg3@master
#>   
  
  
   checking for file 'C:\Users\David.simons\AppData\Local\Temp\RtmpuAhlLk\remotes2d7422cc4d66\David-Simons-testpkg3-00d11ee/DESCRIPTION' ...
  
   checking for file 'C:\Users\David.simons\AppData\Local\Temp\RtmpuAhlLk\remotes2d7422cc4d66\David-Simons-testpkg3-00d11ee/DESCRIPTION' ... 
  
v  checking for file 'C:\Users\David.simons\AppData\Local\Temp\RtmpuAhlLk\remotes2d7422cc4d66\David-Simons-testpkg3-00d11ee/DESCRIPTION' (412ms)
#> 
  
  
  
-  preparing 'testpkg3':
#> 
  
   checking DESCRIPTION meta-information ...
  
   checking DESCRIPTION meta-information ... 
  
v  checking DESCRIPTION meta-information
#> 
  
  
  
-  checking for LF line-endings in source and make files and shell scripts
#> 
  
-  checking for empty or unneeded directories
#> 
  
  
  
-  building 'testpkg3_0.1.0.tar.gz'
#> 
  
   
#> 
#> Installing package into 'C:/Users/David.simons/Documents/R/win-library/3.5'
#> (as 'lib' is unspecified)
testpkg3::hello()
#> [1] "Hello, world!"
testpkg1::hello()
#> Error in loadNamespace(name): there is no package called 'testpkg1'

In both cases, it appears that the "Remotes" section of my DESCRIPTION file is just completely ignored. Am I misinterpreting the vignette, or is this feature not actually implemented yet?

Note that I CAN install testpkg2 succesfully if I first install testpkg1 myself manually...but that seems to defeat the point:

remotes::install_url("https://github.bdap.enernoc.net/David-Simons/testpkg1/archive/master.zip")
#> Downloading package from url: https://github.bdap.enernoc.net/David-Simons/testpkg1/archive/master.zip
#>   
  
  
   checking for file 'C:\Users\David.simons\AppData\Local\Temp\Rtmpm2h1of\remotes2f1420918c0\testpkg1-master/DESCRIPTION' ...
  
   checking for file 'C:\Users\David.simons\AppData\Local\Temp\Rtmpm2h1of\remotes2f1420918c0\testpkg1-master/DESCRIPTION' ... 
  
v  checking for file 'C:\Users\David.simons\AppData\Local\Temp\Rtmpm2h1of\remotes2f1420918c0\testpkg1-master/DESCRIPTION' (431ms)
#> 
  
  
  
-  preparing 'testpkg1':
#>    checking DESCRIPTION meta-information ...
  
   checking DESCRIPTION meta-information ... 
  
v  checking DESCRIPTION meta-information
#> 
  
  
  
-  checking for LF line-endings in source and make files and shell scripts
#> 
  
-  checking for empty or unneeded directories
#> 
  
  
  
-  building 'testpkg1_0.1.0.tar.gz'
#> 
  
   
#> 
#> Installing package into 'C:/Users/David.simons/Documents/R/win-library/3.5'
#> (as 'lib' is unspecified)
remotes::install_github("David-Simons/testpkg2", host="github.bdap.enernoc.net/api/v3")
#> Downloading GitHub repo David-Simons/testpkg2@master
#> Downloading package from url: https://github.bdap.enernoc.net/David-Simons/testpkg1/archive/master.zip
#>   
  
  
   checking for file 'C:\Users\David.simons\AppData\Local\Temp\Rtmpm2h1of\remotes2f143899744d\testpkg1-master/DESCRIPTION' ...
  
   checking for file 'C:\Users\David.simons\AppData\Local\Temp\Rtmpm2h1of\remotes2f143899744d\testpkg1-master/DESCRIPTION' ... 
  
v  checking for file 'C:\Users\David.simons\AppData\Local\Temp\Rtmpm2h1of\remotes2f143899744d\testpkg1-master/DESCRIPTION' (393ms)
#> 
  
  
  
-  preparing 'testpkg1':
#> 
  
v  checking DESCRIPTION meta-information
#> 
  
  
  
-  checking for LF line-endings in source and make files and shell scripts
#> 
  
-  checking for empty or unneeded directories
#> 
  
  
  
-  building 'testpkg1_0.1.0.tar.gz'
#> 
  
   
#> 
#> Installing package into 'C:/Users/David.simons/Documents/R/win-library/3.5'
#> (as 'lib' is unspecified)
#>   
  
  
   checking 
  
   checking for file 'C:\Users\David.simons\AppData\Local\Temp\Rtmpm2h1of\remotes2f147aae5e82\David-Simons-testpkg2-c34a897/DESCRIPTION' ...
  
   checking for file 'C:\Users\David.simons\AppData\Local\Temp\Rtmpm2h1of\remotes2f147aae5e82\David-Simons-testpkg2-c34a897/DESCRIPTION' ... 
  
   checking for file 'C:\Users\David.simons\AppData\Local\Temp\Rtmpm2h1of\remotes2f147aae5e82\David-Simons-testpkg2-c34a897/DESCRIPTION' ... OK
  
v  checking for file 'C:\Users\David.simons\AppData\Local\Temp\Rtmpm2h1of\remotes2f147aae5e82\David-Simons-testpkg2-c34a897/DESCRIPTION' (385ms)
#> 
  
  
  
-  preparing 'testpkg2':
#>    checking 
  
   checking DESCRIPTION meta-information ...
  
   checking DESCRIPTION meta-information ... 
  
v  checking DESCRIPTION meta-information
#> 
  
  
  
-  checking for LF line-endings in source and make files and shell scripts
#> 
  
-  checking for empty or unneeded directories
#> 
  
  
  
-  building 'testpkg2_0.1.0.tar.gz'
#> 
  
   
#> 
#> Installing package into 'C:/Users/David.simons/Documents/R/win-library/3.5'
#> (as 'lib' is unspecified)
testpkg1::hello()
#> [1] "Hello, world!"
testpkg2::hello()
#> [1] "Hello, world!"

Activity

  1. d-sci commented on Nov 9, 2018

    @d-sci
    Author

    Here is the actual screen shot from the failed install (I used reprex to generate the markdown above but it doesn't seem to work too well with all the different types of output):
    image

  2. jimhester commented on Nov 9, 2018

    @jimhester
    Member

    I can reproduce the issue, the problem seems to be that URL remotes don't have a package name and we are filtering remotes by the package name. I think the logic needs to be changed to keep remotes with a NA package name as well.

  3. added a commit that references this issue on Nov 9, 2018
    84c78f8
  4. jimhester commented on Nov 9, 2018

    @jimhester
    Member

    This should be fixed by #247

    Please try installing it with

    remotes::install_github("r-lib/remotes#247")

    And testing it on your example to see if it fixes the issue.

  5. d-sci commented on Nov 9, 2018

    @d-sci
    Author

    Thanks for your rapid response. The remote dependency (testpkg1) is now installed, but I get an error before the actual target package (testpkg2) is installed:

    Error in if (type == "binary") { : argument is of length zero
    

    image

  6. d-sci commented on Nov 9, 2018

    @d-sci
    Author

    Or, if I already have testpkg1, I get:

    Downloading package from url: https://github.bdap.enernoc.net/David-Simons/testpkg1/archive/master.zip
    Skipping testpkg1, it is already being installed
    Error in vapply(remotes, install_remote, ..., FUN.VALUE = character(1)) : 
      values must be type 'character',
     but FUN(X[[1]]) result is type 'logical'
    
  7. added a commit that references this issue on Nov 9, 2018
    9628059
  8. jimhester commented on Nov 9, 2018

    @jimhester
    Member

    Please try installing from the PR again, I have pushed additional changes which should fix this.

  9. d-sci commented on Nov 9, 2018

    @d-sci
    Author

    Working now! Thanks a tonne -- this will make managing our internal package dependencies so much better :)

  10. added 3 commits that reference this issue on Jan 26, 2019
    2c25787
    2e7ab0e
    8419037
  11. added a commit that references this issue on Aug 19, 2020
    cc683bf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions