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 failed by LazyData: true #47

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

Install failed by LazyData: true #47

dan9401 opened this issue Aug 2, 2021 · 7 comments

Comments

@dan9401
Copy link

dan9401 commented Aug 2, 2021

@JustinMShea As the title, I had an install error when running devtools::install_github("braverock/FactorAnalytics"). (After the merge conflict in #41 is resolved.)

* 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’

Removing the LazyData: true in the DESCRIPTION allows the package to be installed, but I'm not sure if this will mess up the compression.

It's not really helpful, but a similar issue here for reference: carlanetto/M4comp2018#1.

@JustinMShea
Copy link
Collaborator

Hi @dan9401,

We recently added git large file storage which has created issues if one doesn't have it. See the readme section on this topic.

I'd suggest installing git lfs and then trying to install the package again.

Thanks

@dan9401
Copy link
Author

dan9401 commented Aug 2, 2021

The problem still seems to persist after git-lfs installed, it may be something not configured right in my system though. Rstudio seems to be using the correct git path, is devtools configured separately?

@braverock
Copy link
Owner

Rtools needs to be installed to build from source if you are on Windows, and then remotes and devtools need to be installed too to build from RStudio. Rstudio can handle most of the config except for the Rtools part.

check the data files, if they are tiny text files (just pointers) then you are just seeing the pointer files, and not the actual data files when you clone.

@dan9401
Copy link
Author

dan9401 commented Aug 2, 2021

I was testing on a Mac system, with remotes and devtools installed of course.
But for the experiment, I tested the installation in an Windows environment as well. Still getting the same error with all the build tools and git-lfs installed.

@JustinMShea
Copy link
Collaborator

It looks like I'm able to replicate your error, but when I clone the repo direclty (not using remotes or devtools), I don't get the issue. We are fairly certain this has to do with git lfs, which we may need to remove.

If we remove the LazyData = true, it will reduce compression efficiency, and create WARNINGS on build that we need to eliminate in order to get this on CRAN

@JustinMShea
Copy link
Collaborator

JustinMShea commented Aug 4, 2021

@dan9401 After considering further, git lfs is helpful for us, especially as a key part of this project is the data.

I think you should open this issue under remotes or devtools, as you now have two examples to list. I would go open an issue there and create a reproducible example with git lfs.

For FactorAnalytics, ditch both, and just use git to clone the repo and build it locally.

@braverock
Copy link
Owner

@dan9401 thanks for reporting to the remotes team.

I'm going to reference the remotes issue here so that we can more easily track upstream progress towards the fix.

[r-lib/remotes/issues/637] contains a description of the issue in how remotes doesn't handle git-lfs

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