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

Issues on Windows #169

Open
asbates opened this issue Nov 10, 2022 · 5 comments
Open

Issues on Windows #169

asbates opened this issue Nov 10, 2022 · 5 comments

Comments

@asbates
Copy link
Contributor

asbates commented Nov 10, 2022

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 examples

  • I have to clear the cache a lot, which is slow
  • Sometimes the correct branch of dependencies does not get installed
  • Sometimes the current branch is not installed even with install_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.

@nikolas-burkoff
Copy link
Contributor

nikolas-burkoff commented Nov 11, 2022

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.

@asbates
Copy link
Contributor Author

asbates commented Nov 14, 2022

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.

@asbates
Copy link
Contributor Author

asbates commented Nov 17, 2022

@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.

@nikolas-burkoff
Copy link
Contributor

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?

@asbates
Copy link
Contributor Author

asbates commented Dec 1, 2022

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.

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

2 participants