load failure when git stub found on macOS
Closed this issue · 2 comments
Currently, renv
is failing R CMD check
on CRAN's r-oldrel-macos machine:
https://www.r-project.org/nosvn/R.check/r-oldrel-macos-x86_64/renv-00check.html
> renv:::renv_tests_init()
xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" cannot be located.
git: error: unable to find utility "git", not a developer tool or in PATH
xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" cannot be located.
git: error: unable to find utility "git", not a developer tool or in PATH
Error: (converted from warning) .onLoad failed in loadNamespace() for 'credentials', details:
call: NULL
error: Failed to call 'git help -a'
Execution halted
It looks like the credentials
package is trying to use git
on startup, and that is failing?
I suspect that this needs to be fixed on the CRAN side (why aren't command line tools installed on that machine?) but figured it would be worth filing here for posterity since the issue may effect users who haven't installed command line tools on their machine.
Hmm. This should only be a a warning, why does it get converted to an error? Error: (converted from warning)
. Perhaps it is safer to use a message instead of a warning then.
The old 3.6 macbuilder did not have the command line tools, because that would conflict with the custom clang build that they were using for R < 3.6. Fortunately they switched to standard xcode compilers for R 4.0 and up, so that part of the problem will resolve itself in April when 3.6 falls off the CRAN radar.
Agree this should be fixed on the renv
side (we shouldn't treat warnings as errors when loading a package).