-
Notifications
You must be signed in to change notification settings - Fork 24
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
return value of BiocManager::install()
#39
Comments
Sounds pretty reasonable, though probably requiring a final step that consults installed packages to assess success. FWIW the behavior of BiocManager::install() is the same as biocLite(), and marginally better than install.packages (documented as returning NULL, invisibly). I think I'd implement this along the lines of
I guess this fails when 'For the user' (rather than for a robust package solution) in the scenario you describe one might use a calling handler to filter and continue after acceptable warnings
Identifying only relevant warnings might be tricky, especially 'in general', because messages are translated to the locale of the system. One could stop on all warnings (but this is too stringent, with warnings for reasons other than failed package installation)
One would definitely want to arrive at a 'vectorized' solution with a single call to BiocManager::install() for several packages, because of the latency involved with checking and downloading individual packages. |
Thanks Martin, I learned a few things from these solutions! The first one is adequate for my purposes, up to you whether the cost-benefit of implementing a conditional return value is worthwhile, noting these approaches in the documentation could also be a resolution. FWIW, there has been a similar discussion about |
Any update on this? As part of a build process I want to fail the build if installing a package fails (e.g., for missing system dependency). The logs clearly show the errors but I need to know that something failed. |
Note that |
Having
BiocManager::install()
return the "pkgs" argument is not especially useful. Could it instead return success/error codes? Otherwise, how can you tell in a script whether the requested packages were installed successfully or not?The text was updated successfully, but these errors were encountered: