From e5072fca6c7db8b67ea010cac6aa92dec29fdb7a Mon Sep 17 00:00:00 2001 From: Ilia Kosenkov Date: Sun, 31 Mar 2024 00:25:54 +0200 Subject: [PATCH] Support RTOOLS44 (#347) * Support RTOOLS44 * Update NEWS --- NEWS.md | 1 + R/source.R | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index ff429715..b5c7b6dc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,7 @@ * `use_extendr()` correctly handles calls with `path` not equal to `"."` (current folder), or when there is no active `{usethis}` project (#323). * Fixes an issue in pre-defined set of known features: added `either` (#338) * `create_extendr_package()` allows user to create project directory using RStudio's **Project Command**. (#321) +* Support `RTOOLS44` (#347) # rextend 0.3.1 diff --git a/R/source.R b/R/source.R index 350fb8f9..8cc564cf 100644 --- a/R/source.R +++ b/R/source.R @@ -314,7 +314,11 @@ invoke_cargo <- function(toolchain, specific_target, dir, profile, cli::cli_abort("rextendr currently supports R 4.x", class = "rextendr_error") } - if (package_version(R.version$minor) >= "3.0") { + minor_patch <- package_version(R.version$minor) + + if (minor_patch >= "4.0") { + rtools_version <- "44" # nolint: object_usage_linter + } else if (minor_patch >= "3.0") { rtools_version <- "43" # nolint: object_usage_linter } else { rtools_version <- "42" # nolint: object_usage_linter