Open asbates opened 1 year ago
I think it's really important things work smoothly on Windows because if not, that would be a barrier to entry for a lot of people.
So a large number of people including me are using staged.deps on Windows - it's not just NEST but admiral which is using it... and it is working smoothly for them. Which suggests there's something different about your setup compared to other people's which we can investigate if we have capacity 😄
investigated and think the problem (or part of it) is that the cache directory is created as read only. And I believe admin access is needed to make it writable.
this is weird as my day to day account does not have admin access and my package cache is stored inside My Documents and it all works fine. But maybe it is this.
The cache directory is taken from options(staged.dependencies._storage_dir)
so you can change that to a directory you have created with write access so you can explore what's going on further. It is also possible to change the cache directory on the fly using this (which used for the tests).
Creating the cache uses the standard dir.create function and as far as I'm aware all the file/directory creating and copying use base R or the fs package. We have had problems with Windows and base R in the past so maybe moving to the fs equivalents will make things work.
OK this gives me some more avenues for investigation. Thanks! We didn't realize others used Windows so assumed that was the main problem. But it seems now it's more of the configuration of my set up. Now it seems like there's something unusual about my system. I'll continue to look into this and update here.
@nikolas-burkoff where does the cache directory live for you? Mine is at C:\Users\andre\OneDrive\Documents\.staged.dependencies
. I'm wondering of One Drive is the culprit.
Ah so mine is not on OneDrive - that may well be the problem - nice spot -> so for now I would suggest setting the option "staged.dependencies._storage_dir" in your .Rprofile file to a location not on OneDrive.
Otherwise maybe it's possible you could also manually create the storage directory in OneDrive (so permissions are OK) and then turn off sync-ing for that folder?
Success! I think I've finally got it working. I'll give it some time and if no other issues arise I'll open a new issue here to add some documentation.
I've had a number of issues with
staged.dependencies
on Windows. I can't really make a reprex unfortunately because the issues are sporadic. Some examplesinstall_project = TRUE
@donyunardi and I investigated and think the problem (or part of it) is that the cache directory is created as read only. And I believe admin access is needed to make it writable.
I think it's really important things work smoothly on Windows because if not, that would be a barrier to entry for a lot of people.