-
Notifications
You must be signed in to change notification settings - Fork 29
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
Fix check() failing when Rtools not installed #178
base: main
Are you sure you want to change the base?
Conversation
pkgbuild::local_build_tools() fails if Rtools is missing on Windows when `required` argument is TRUE, which is the default. This changes `required` to FALSE, which shouldn't through an error. Closes r-lib#174.
Codecov Report
@@ Coverage Diff @@
## main #178 +/- ##
=======================================
Coverage 80.63% 80.63%
=======================================
Files 19 19
Lines 1007 1007
=======================================
Hits 812 812
Misses 195 195
Continue to review full report at Codecov.
|
Thanks! So after this patch, what happens if a package needs Rtools, but it is not installed? What is the error you get? |
I tried this patch out with the This output is very similar to (if not the same as) the output from rcmdcheck 1.4.0, shown below. With patchrcmdcheck::rcmdcheck()
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
-- R CMD build ------------------------------------------------------------------------------------------------
pdflatex not found! Not building PDF manual.
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
Error: Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem. ==> devtools::check(document = FALSE)
-- Building ------------------------------------------- data.table --
Setting env vars:
* CFLAGS : -Wall -pedantic
* CXXFLAGS : -Wall -pedantic
* CXX11FLAGS: -Wall -pedantic
---------------------------------------------------------------------
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
Error: Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
Execution halted
Exited with status 1. rcmdcheck 1.4.0> rcmdcheck::rcmdcheck()
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
Error: Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem. ==> devtools::check(document = FALSE)
-- Building ------------------------------------------- data.table --
Setting env vars:
* CFLAGS : -Wall -pedantic
* CXXFLAGS : -Wall -pedantic
* CXX11FLAGS: -Wall -pedantic
---------------------------------------------------------------------
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
Error: Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
Execution halted
Exited with status 1. |
Separately, the checks show that the package now fails for R 3.4. I don't know if this is related to this PR, or if that's because of a change somewhere else? |
pkgbuild::local_build_tools() fails if Rtools is missing on Windows
when
required
argument is TRUE, which is the default. This changesrequired
to FALSE, which shouldn't throw an error, but will load Rtoolsif it is available.
Closes #174.