Skip to content

Commit

Permalink
Bump min version in more places
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Jul 9, 2024
1 parent 2036976 commit c2d39d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion r/tools/check-versions.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ release_version_supported <- function(r_version, cpp_version) {
minimum_cpp_version <- package_version("15.0.0")

allow_mismatch <- identical(tolower(Sys.getenv("ARROW_R_ALLOW_CPP_VERSION_MISMATCH", "false")), "true")
# If we allow a version mismatch we still need to cover the minimum version (13.0.0 for now)
# If we allow a version mismatch we still need to cover the minimum version (15.0.0 for now)
# we don't allow newer C++ versions as new features without additional feature gates are likely to
# break the R package
version_valid <- cpp_version >= minimum_cpp_version && major(cpp_version) <= major(r_version)
Expand Down
10 changes: 9 additions & 1 deletion r/tools/test-check-versions.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,24 @@ test_that("check_versions without mismatch", {
test_that("check_versions with mismatch", {
withr::local_envvar(.new = c(ARROW_R_ALLOW_CPP_VERSION_MISMATCH = "false"))

expect_true(
release_version_supported("15.0.0", "15.0.0")
)

expect_false(
release_version_supported("15.0.0", "13.0.0")
)

withr::local_envvar(.new = c(ARROW_R_ALLOW_CPP_VERSION_MISMATCH = "true"))

expect_true(
expect_false(
release_version_supported("15.0.0", "13.0.0")
)

expect_true(
release_version_supported("16.0.0", "15.0.0")
)

expect_false(
release_version_supported("15.0.0", "16.0.0")
)
Expand Down

0 comments on commit c2d39d0

Please sign in to comment.