The latest R/Rtools release broke the installr::install.Rtools functionality (https://github.com/talgalili/installr/issues/148).
I am working on a fix, but for this fix it would be very convenient if either version_info or rtools_needed would be exported. (Of course, it would be even more convenient if pkgbuild would have a function to install a compatible Rtools 😁)
What I was trying to do:
rtools_needed <- function(r_version = getRversion())
tryCatch({
version_info <- pkgbuild:::version_info
version_info$custom <- NULL
for (i in rev(seq_along(version_info))) {
version <- names(version_info)[i]
info <- version_info[[i]]
ok <- r_version >= info$version_min && r_version <= info$version_max
if (ok) return(version)
}
}, error = function(e) { })
stop("Can't determine compatible Rtools version")
}
but because the ::: I don't think this is going to pass CRAN checks 😅
Happy to discuss options/opinions!
Thanks! Still one issue, it always returns "Rtools custom", that is because it always checks it first and it's always ok, that's why I removed custom in my code above
The latest R/Rtools release broke the
installr::install.Rtools
functionality (https://github.com/talgalili/installr/issues/148). I am working on a fix, but for this fix it would be very convenient if eitherversion_info
orrtools_needed
would be exported. (Of course, it would be even more convenient if pkgbuild would have a function to install a compatible Rtools 😁)What I was trying to do:
but because the
:::
I don't think this is going to pass CRAN checks 😅 Happy to discuss options/opinions!