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

installation of xfun fails to copy xfun.dll silently to a network drive #2020

Open
fernandoroa opened this issue Oct 15, 2024 · 3 comments
Open

Comments

@fernandoroa
Copy link

fernandoroa commented Oct 15, 2024

In Windows, library(xfun) fails after an installation (renv::install) without errors, because of lack of xfun.dll
when using a folder from a network path mapped to a letter drive. VSCode R extension requires the use of a the letter instead of the network path.

I can see the expected file(s) in the cache folder:

...\\xfun\\libs\\x64

symbols.rds xfun.dll*

But xfun.dll is missing from the local renv folder (in drive mapped to a letter).

As a workaround I can cp the file from cache folder to local folder, when renv folder is not locked / in use.

  • Is unexpected that symbols.rds is copied and the other file not.
  • It is unexpected that an error is not raised during installation for the failed copy

Another workaround could be

You may also want to set RENV_PATHS_CACHE so that the global package cache can be stored on the same volume as the projects you normally work on. This is especially important when working projects stored on a networked filesystem. link

  • same for package glue
@kevinushey
Copy link
Collaborator

Sorry for the late response. I'm not entirely sure what's going on, but I suspect your simplest ways forward would be configuring the cache path (as you noted above), or simply disabling the cache altogether with e.g. renv::settings$use.cache(FALSE).

@fernandoroa
Copy link
Author

Maybe it is that one file gets copied for default, while the other is supposed to be a symlink?, but maybe the system is not allowed to make symlinks, or symlinking fails because it involves a network path. I think an error should be raised when symlinking or copies fail, or when in general the system is not symlink capable and system will try to do so (or give warning).

@kevinushey
Copy link
Collaborator

For what it's worth, on Windows, renv by default uses robocopy to copy directories -- perhaps we're not catching errors appropriately when one or more files fail to copy.

This can be changed, if you want to test -- try setting

options(renv.config.copy.method = "r")

See https://rstudio.github.io/renv/reference/config.html#copy-methods for more details.

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