Closed sdrakulich closed 6 years ago
pacman
was explicitly not included in this project, and load.project
should indeed install the missing packages. For me it works fine, but it appears some people are experiencing this issue (see for example #213 and #216). Since we cannot replicate the situation this is very hard to debug. There is already a function that tries to load the package, and if that fails installs it (much like pacman
does, but without adding the dependency on an external package).
Do you get any error when you call load.project
on a system that hasn't got the necessary packages installed? Also, could you paste the contents of your config/global.dcf
file?
Hmm, I just noticed that all warnings generated inside require.package
are currently hidden. Perhaps @KentonWhite can shine a light on why he coded it that way, it might be that it obscures the problem @sdrakulich experiences.
First, I apologize for not using search.
Now that that's out of the way, I think I know what the problem is. The way I'm executing, there is no default repository set. If I could pass that argument globally to just default to the CRAN one, that should make this work under my infrastructure (Atom-editor with R-enabled functionality through jupyter lab).
Ah, but you don't get the request to select a repository? And do you get that request when manually installing a package? Because if that request is somehow hidden as an effect of using require.package
as a wrapper around install.packages
then we should try and fix that of course.
Can I just reply to the email? Anyways, this is the error I get. I'm missing the last package in my load sequence.
Project name: XXX
Loading project configuration Autoloading packages Loading package: <
> Loading package: beepr Loading required package: beepr Error in contrib.url(repos, "source"): trying to use CRAN without setting a mirror Traceback:
- load.project()
- .load.libraries(config, my.project.info)
- require.package(package.to.load)
- install.packages(package.name)
- contrib.url(repos, "source")
- stop("trying to use CRAN without setting a mirror")
On Sat, May 5, 2018 at 11:06 AM, Hugo van den Berg <notifications@github.com
wrote:
Ah, but you don't get the request to select a repository? And do you get that request when manually installing a package? Because if that request is somehow hidden as an effect of using require.package as a wrapper around install.packages then we should try and fix that of course.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/KentonWhite/ProjectTemplate/issues/259#issuecomment-386811873, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKtbhjVWsyxXy3G0RYdzHRF55lNbMusks5tvcAOgaJpZM4TzgmI .
We can unquiet warnings in require.package
. It was added to minimize the amount of information when installing packages. It may be helpful for debugging. I'll make a quick PR.
Warnings are unquieted in require.package
.
@sdrakulich can you reinstall ProjectTemplate
from GitHub using install_github('KentonWhite/ProjectTemplate')
, rerun your project and repost the errors and warnings please.
@sdrakulich Could you please tell us if the error still occurs and what warnings you see after installing the latest version from github?
Haven't heard that the error still persists. Closing for now. If this error still is happening please reopen.
Report an Issue / Request a Feature
I'm submitting a (Check one with "x") :
Issue Severity Classification -
(Check one with "x") :
Expected Behavior
A repository I move between systems works seamlessly when load.project() is executed.
Current Behavior
It fails to load packages the other system does not have installed.
Version Information
Latest version
Possible Solution
I would if I wasn't a complete beginner. Haven't touched the innards of a function yet. That being said, I found this and felt it should be fairly straightforward to implement. I might try myself! The package is called "pacman". Explained here.