Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remotes dependency installed twice #1086

Closed
tdhock opened this issue Feb 12, 2016 · 3 comments
Closed

Remotes dependency installed twice #1086

tdhock opened this issue Feb 12, 2016 · 3 comments

Comments

@tdhock
Copy link

tdhock commented Feb 12, 2016

Using the most recent version of devtools on github, I am trying to do install_github("tdhock/animint") in which I have used the Remotes field to indicate that I would like to depend on tdhock/ggplot2 rather than the newer version of ggplot2 on CRAN: https://github.com/tdhock/animint/blob/master/DESCRIPTION#L34

devtools does install tdhock/ggplot2 first, but then also installs the CRAN version, and then fails since animint depends on ggplot2 < 2.0.

Would you please consider fixing this bug in install_github? The behavior that I expect is: only install tdhock/ggplot2 (the version specified in the Remotes field), and do NOT install ggplot2 from CRAN.

tdhock@recycled:~/R$ R --vanilla

R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: i686-pc-linux-gnu (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> devtools::install_github("tdhock/animint")
Downloading GitHub repo tdhock/animint@master
from URL https://api.github.com/repos/tdhock/animint/zipball/master
Installing animint
Downloading GitHub repo tdhock/ggplot2@master
from URL https://api.github.com/repos/tdhock/ggplot2/zipball/master
Installing ggplot2
'/home/tdhock/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore  \
  --quiet CMD INSTALL  \
  '/tmp/RtmpnICZzP/devtoolsc5b70ef74b3/tdhock-ggplot2-a8b06dd'  \
  --library='/home/tdhock/lib/R/library' --install-tests 

* installing *source* package ‘ggplot2’ ...
** R
** data
*** moving datasets to lazyload DB
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (ggplot2)
Installing 1 package: ggplot2
trying URL 'http://cran.rstudio.com/src/contrib/ggplot2_2.0.0.tar.gz'
Content type 'application/x-gzip' length 1546130 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

* installing *source* package ‘ggplot2’ ...
** package ‘ggplot2’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (ggplot2)

The downloaded source packages are in
    ‘/tmp/RtmpnICZzP/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
'/home/tdhock/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore  \
  --quiet CMD INSTALL  \
  '/tmp/RtmpnICZzP/devtoolsc5b5fab94e4/tdhock-animint-57d3f09'  \
  --library='/home/tdhock/lib/R/library' --install-tests 

* installing *source* package ‘animint’ ...
** R
** data
** inst
** tests
** preparing package for lazy loading
Error : package ‘ggplot2’ 2.0.0 was found, but < 2.0 is required by ‘animint’
ERROR: lazy loading failed for package ‘animint’
* removing ‘/home/tdhock/lib/R/library/animint’
* restoring previous ‘/home/tdhock/lib/R/library/animint’
Error: Command failed (1)
> devtools::session_info()
Session info -------------------------------------------------------------------
 setting  value                       
 version  R version 3.2.2 (2015-08-14)
 system   i686, linux-gnu             
 ui       X11                         
 language en_US                       
 collate  en_US.UTF-8                 
 tz       Canada/Eastern              
 date     2016-02-12                  

Packages -----------------------------------------------------------------------
 package  * version     date       source        
 curl       0.9.3       2015-08-25 CRAN (R 3.2.2)
 devtools   1.10.0.9000 2016-02-12 local         
 digest     0.6.9       2016-01-08 CRAN (R 3.2.2)
 git2r      0.11.0      2015-08-12 CRAN (R 3.2.2)
 httr       1.0.0       2015-06-25 CRAN (R 3.2.2)
 knitr      1.11        2015-08-14 CRAN (R 3.2.2)
 magrittr   1.5         2014-11-22 CRAN (R 3.2.2)
 memoise    1.0.0       2016-01-29 CRAN (R 3.2.2)
 R6         2.1.1       2015-08-19 CRAN (R 3.2.2)
 stringi    1.0-1       2015-10-22 CRAN (R 3.2.2)
 stringr    1.0.0       2015-04-30 CRAN (R 3.2.2)
 withr      1.0.1       2016-02-04 CRAN (R 3.2.2)
> 
@jimhester
Copy link
Member

If you use install_github("tdhock/animint", upgrade_dependencies = FALSE) it will not try to upgrade the outdated ggplot2.

Alternatively you can artificially bump the version number in your fork of ggplot2 to be higher than the CRAN version.

The assumption is that development dependencies will always have greater versions than CRAN versions. It might be worth tweaking the logic to exclude development packages from the version checking logic entirely however...

@tdhock
Copy link
Author

tdhock commented Feb 12, 2016

upgrade_dependencies=FALSE worked for me

On Fri, Feb 12, 2016 at 8:15 AM, Jim Hester [email protected]
wrote:

If you use install_github("tdhock/animint", upgrade_dependencies = FALSE)
it will not try to upgrade the outdated devtools.

Alternatively you can artificially bump the version number in your fork of
ggplot2 to be higher than the CRAN version.

The assumption is that development dependencies will always have greater
versions than CRAN versions. It might be worth tweaking the logic to
exclude development packages from the version checking logic entirely
however...


Reply to this email directly or view it on GitHub
#1086 (comment).

@lock
Copy link

lock bot commented Sep 18, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Sep 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants