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

install_github() failed by LazyData: true and git-lfs #637

Closed
dan9401 opened this issue Aug 4, 2021 · 2 comments
Closed

install_github() failed by LazyData: true and git-lfs #637

dan9401 opened this issue Aug 4, 2021 · 2 comments

Comments

@dan9401
Copy link

dan9401 commented Aug 4, 2021

Hi, we had an install error when running devtools::install_github("braverock/FactorAnalytics"):

* installing *source* package ‘FactorAnalytics’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
Warning: file ‘StockReturns.rda’ has magic number 'versi'
  Use of save versions prior to 2 is deprecated
Error in load(zfile, envir = tmp_env) : 
  bad restore file magic number (file may be corrupted) -- no data loaded
ERROR: lazydata failed for package ‘FactorAnalytics’

The error is triggered by LazyData: true when installed from remote, and only seems to occur in repos with git-lfs objects, see carlanetto/M4comp2018#1 and braverock/FactorAnalytics#47.

devtools::install_github("braverock/FactorAnalytics") works when LazyData: true is removed from DESCRIPTION, we can also clone and build from local source without error.

Thanks.

@jimhester
Copy link
Member

I think this is related to when the data files are fetched via git-lfs, perhaps you need to avoid using LazyData: true in these cases.

I don't think there is anything we could do in remotes to change this unfortunately.

Perhaps you could open an issue at https://community.rstudio.com and see if other community members have advice on best practices when using git-lfs?

@braverock
Copy link

It simply isn't true that there is "nothing you could do" in remotes. remotes should support 'git-lfs clone' just like it supports 'git clone'. LFS is the recommended way to support binary files in git, it isn't a "niche" solution.

mwmclean added a commit to Displayr/flipGeoData that referenced this issue Dec 3, 2021
* Allows pkg to be installed via remotes::install_github
* Avoids issue described in r-lib/remotes#637
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants