Skip to content

Commit c3f30b2

Browse files
authored
Merge branch 'main' into patch-8
2 parents 2d54171 + 5009b3d commit c3f30b2

File tree

175 files changed

+5757
-11554
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+5757
-11554
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@
2424
^\.vscode$
2525
^compile_commands\.json$
2626
.*\.clangd$
27+
^[\.]?air\.toml$

DESCRIPTION

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: rlang
2-
Version: 1.1.4.9000
2+
Version: 1.1.6.9000
33
Title: Functions for Base Types and Core R and 'Tidyverse' Features
44
Description: A toolbox for working with base types, core R features
55
like the condition system, and core 'Tidyverse' features like tidy
@@ -8,12 +8,12 @@ Authors@R: c(
88
person("Lionel", "Henry", ,"[email protected]", c("aut", "cre")),
99
person("Hadley", "Wickham", ,"[email protected]", "aut"),
1010
person(given = "mikefc",
11-
email = "[email protected]",
12-
role = "cph",
11+
email = "[email protected]",
12+
role = "cph",
1313
comment = "Hash implementation based on Mike's xxhashlite"),
1414
person(given = "Yann",
1515
family = "Collet",
16-
role = "cph",
16+
role = "cph",
1717
comment = "Author of the embedded xxHash library"),
1818
person(given = "Posit, PBC", role = c("cph", "fnd"))
1919
)
@@ -28,20 +28,22 @@ Suggests:
2828
cli (>= 3.1.0),
2929
covr,
3030
crayon,
31+
desc,
3132
fs,
3233
glue,
3334
knitr,
3435
magrittr,
3536
methods,
3637
pillar,
38+
pkgload,
3739
rmarkdown,
3840
stats,
39-
testthat (>= 3.0.0),
41+
testthat (>= 3.2.0),
4042
tibble,
4143
usethis,
4244
vctrs (>= 0.2.3),
4345
withr
44-
Enhances:
46+
Enhances:
4547
winch
4648
Encoding: UTF-8
4749
RoxygenNote: 7.3.2

NEWS.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
# rlang (development version)
22

3+
# rlang 1.1.6
4+
5+
* Fixes for CRAN checks.
6+
7+
* Progress towards making rlang conformant with the public C API of R.
8+
39
* `env_browse()` and `env_is_browsed()` are now defunct as they require an API
410
that is no longer available to packages (#1727).
511

12+
* The SEXP iterator of the rlang C library (used in r-lib/memtools) is now
13+
behind a feature flag because it requires private API accessors. Compile
14+
rlang with `-DRLANG_USE_PRIVATE_ACCESSORS` to enable it.
15+
616
* `env_unlock()` is now defunct because recent versions of R no long
717
make it possible to unlock an environment (#1705). Make sure to use an
818
up-to-date version of pkgload (>= 1.4.0) following this change.
9-
19+
1020
* `is_dictionaryish()` now will return TRUE for NULL (@ilovemane, #1712).
1121

1222

R/aaa-topics.R

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,32 @@ titles <- list(
22
# NSE
33

44
## Overviews
5-
topic_data_mask =
6-
"What is data-masking and why do I need `{{`?",
7-
topic_data_mask_programming =
8-
"Data mask programming patterns",
9-
topic_metaprogramming =
10-
"Metaprogramming patterns",
11-
topic_defuse =
12-
"Defusing R expressions",
13-
topic_inject =
14-
"Injecting with `!!`, `!!!`, and glue syntax",
15-
topic_quosure =
16-
"What are quosures and when are they needed?",
5+
topic_data_mask = "What is data-masking and why do I need `{{`?",
6+
topic_data_mask_programming = "Data mask programming patterns",
7+
topic_metaprogramming = "Metaprogramming patterns",
8+
topic_defuse = "Defusing R expressions",
9+
topic_inject = "Injecting with `!!`, `!!!`, and glue syntax",
10+
topic_quosure = "What are quosures and when are they needed?",
1711

1812
## Guides
19-
topic_data_mask_ambiguity =
20-
"The data mask ambiguity",
21-
topic_double_evaluation =
22-
"The double evaluation problem",
23-
topic_multiple_columns =
24-
"Taking multiple columns without `...`",
13+
topic_data_mask_ambiguity = "The data mask ambiguity",
14+
topic_double_evaluation = "The double evaluation problem",
15+
topic_multiple_columns = "Taking multiple columns without `...`",
2516

2617
## Notes
27-
topic_embrace_non_args =
28-
"Does `{{` work on regular objects?",
29-
topic_embrace_constants =
30-
"Why are strings and other constants enquosed in the empty environment?",
31-
topic_inject_out_of_context =
32-
"What happens if I use injection operators out of context?",
18+
topic_embrace_non_args = "Does `{{` work on regular objects?",
19+
topic_embrace_constants = "Why are strings and other constants enquosed in the empty environment?",
20+
topic_inject_out_of_context = "What happens if I use injection operators out of context?",
3321

3422
# Errors
3523

3624
## Guides
37-
topic_error_call =
38-
"Including function calls in error messages",
39-
topic_error_chaining =
40-
"Including contextual information with error chains",
41-
topic_condition_formatting =
42-
"Formatting messages with cli",
25+
topic_error_call = "Including function calls in error messages",
26+
topic_error_chaining = "Including contextual information with error chains",
27+
topic_condition_formatting = "Formatting messages with cli",
4328

4429
## Notes
45-
topic_condition_customisation =
46-
"Customising condition messages"
30+
topic_condition_customisation = "Customising condition messages"
4731
)
4832

4933
sprintf_topic_link <- function(id, topic = NULL) {
@@ -71,9 +55,15 @@ sprintf_topic_link <- function(id, topic = NULL) {
7155
links <- lapply(names(titles), sprintf_topic_link)
7256
names(links) <- names(titles)
7357

74-
links[["{{"]] <- "\\ifelse{html}{\\code{\\link[=embrace-operator]{\\{\\{}}}{\\verb{\\{\\{}}"
75-
links[["'{{'"]] <- "\\ifelse{html}{\\code{\\link[=glue-operators]{\"\\{\\{\"}}}{\\verb{\"\\{\\{\"}}"
76-
links[["'{'"]] <- "\\ifelse{html}{\\code{\\link[=glue-operators]{\"\\{\"}}}{\\verb{\"\\{\"}}"
58+
links[[
59+
"{{"
60+
]] <- "\\ifelse{html}{\\code{\\link[=embrace-operator]{\\{\\{}}}{\\verb{\\{\\{}}"
61+
links[[
62+
"'{{'"
63+
]] <- "\\ifelse{html}{\\code{\\link[=glue-operators]{\"\\{\\{\"}}}{\\verb{\"\\{\\{\"}}"
64+
links[[
65+
"'{'"
66+
]] <- "\\ifelse{html}{\\code{\\link[=glue-operators]{\"\\{\"}}}{\\verb{\"\\{\"}}"
7767

7868
title <- function(id) {
7969
out <- titles[[id]]

R/aaa.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ the <- new.env(parent = emptyenv())
7575
#'
7676
#' @examples
7777
#' quote({ # Not run
78-
#'
78+
#'
7979
#' # First add `run_on_load()` to your `.onLoad()` hook,
8080
#' # then use `on_load()` anywhere in your package
8181
#' .onLoad <- function(lib, pkg) {

R/arg.R

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@
2828
#' # Throws an informative error for mismatches:
2929
#' try(fn("b"))
3030
#' try(fn("baz"))
31-
arg_match <- function(arg,
32-
values = NULL,
33-
...,
34-
multiple = FALSE,
35-
error_arg = caller_arg(arg),
36-
error_call = caller_env()) {
31+
arg_match <- function(
32+
arg,
33+
values = NULL,
34+
...,
35+
multiple = FALSE,
36+
error_arg = caller_arg(arg),
37+
error_call = caller_env()
38+
) {
3739
check_dots_empty0(...)
3840

3941
arg_expr <- enexpr(arg)
@@ -99,10 +101,12 @@ arg_match_multi <- function(arg, values, error_arg, error_call) {
99101
#' fn1()
100102
#' fn2("bar")
101103
#' try(fn3("zoo"))
102-
arg_match0 <- function(arg,
103-
values,
104-
arg_nm = caller_arg(arg),
105-
error_call = caller_env()) {
104+
arg_match0 <- function(
105+
arg,
106+
values,
107+
arg_nm = caller_arg(arg),
108+
error_call = caller_env()
109+
) {
106110
.External(ffi_arg_match0, arg, values, environment())
107111
}
108112

@@ -192,9 +196,7 @@ arg_match_invalid_msg <- function(val, values, error_arg) {
192196
#' # Succeeds
193197
#' f(NULL)
194198
#' @export
195-
check_required <- function(x,
196-
arg = caller_arg(x),
197-
call = caller_env()) {
199+
check_required <- function(x, arg = caller_arg(x), call = caller_env()) {
198200
if (!missing(x)) {
199201
return(invisible(TRUE))
200202
}
@@ -255,10 +257,12 @@ chr_quoted <- function(chr, type = "`") {
255257
#' }
256258
#' f()
257259
#' @export
258-
check_exclusive <- function(...,
259-
.require = TRUE,
260-
.frame = caller_env(),
261-
.call = .frame) {
260+
check_exclusive <- function(
261+
...,
262+
.require = TRUE,
263+
.frame = caller_env(),
264+
.call = .frame
265+
) {
262266
args <- enexprs(..., .named = TRUE)
263267
if (length(args) < 2) {
264268
abort("Must supply at least two arguments.")

R/attr.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ is_dictionaryish <- function(x) {
122122
}
123123

124124

125-
126125
#' Does an object have an element with this name?
127126
#'
128127
#' This function returns a logical value that indicates if a data

R/bytes.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ byte_units <- c(
121121
'B' = 1,
122122
'k' = 1000,
123123
'K' = 1000,
124-
'M' = 1000 ^ 2,
125-
'G' = 1000 ^ 3,
126-
'T' = 1000 ^ 4,
127-
'P' = 1000 ^ 5,
128-
'E' = 1000 ^ 6,
129-
'Z' = 1000 ^ 7,
130-
'Y' = 1000 ^ 8
124+
'M' = 1000^2,
125+
'G' = 1000^3,
126+
'T' = 1000^4,
127+
'P' = 1000^5,
128+
'E' = 1000^6,
129+
'Z' = 1000^7,
130+
'Y' = 1000^8
131131
)
132132

133133
captures <- function(x, m) {
@@ -227,7 +227,7 @@ max.rlib_bytes <- function(x, ...) {
227227

228228
#' @export
229229
# Adapted from Ops.numeric_version
230-
Ops.rlib_bytes <- function (e1, e2) {
230+
Ops.rlib_bytes <- function(e1, e2) {
231231
if (nargs() == 1L) {
232232
abort(sprintf("unary `%s` not defined for <rlib_bytes> objects", .Generic))
233233
}

R/c-lib.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ detect_rlang_lib_usage <- function(src_path) {
145145
FALSE
146146
}
147147

148+
has_private_accessors <- function() {
149+
.Call(ffi_has_private_accessors)
150+
}
151+
148152

149153
# cnd.c
150154

@@ -401,5 +405,5 @@ vec_resize <- function(x, n) {
401405
# walk.c
402406

403407
sexp_iterate <- function(x, fn) {
404-
.Call(ffi_sexp_iterate, x, fn)
408+
do.call(".Call", list(get("ffi_sexp_iterate"), x, fn))
405409
}

0 commit comments

Comments
 (0)