From a4c880cb32e936cb5c8d7f370370e5a51463c7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Mon, 31 Jan 2022 05:30:36 +0100 Subject: [PATCH 1/3] Remove extra argument to new_pillar() --- R/ctl_pillar.R | 13 ++++++++----- man/new_pillar.Rd | 5 ++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/R/ctl_pillar.R b/R/ctl_pillar.R index 84dc51d2d..35e70b418 100644 --- a/R/ctl_pillar.R +++ b/R/ctl_pillar.R @@ -142,8 +142,7 @@ rowidformat2 <- function(data, names, has_star) { #' @inheritParams pillar #' @param components A named list of components constructed with [pillar_component()]. #' @param class Name of subclass. -#' @param extra For compound pillars, indicate the names or indices of the -#' sub-pillars that could not be shown due to width constraints. +#' @param extra Deprecated. #' #' @export #' @examples @@ -161,9 +160,14 @@ rowidformat2 <- function(data, names, has_star) { #' lines = new_pillar_component(list(lines("=")), width = 1) #' )) new_pillar <- function(components, ..., width = NULL, class = NULL, - extra = NULL) { + extra = deprecated()) { "!!!!DEBUG new_pillar(`v(width)`, `v(class)`)" + if (is_present(extra)) { + # Signal the deprecation to the user + deprecate_warn("1.6.6", "pillar::new_pillar(extra = )") + } + check_dots_empty() if (length(components) > 0 && !is_named(components)) { abort("All components must have names.") @@ -172,8 +176,7 @@ new_pillar <- function(components, ..., width = NULL, class = NULL, structure( components, width = width, - class = c(class, "pillar"), - extra = extra + class = c(class, "pillar") ) } diff --git a/man/new_pillar.Rd b/man/new_pillar.Rd index ac41e74d2..9c803cc26 100644 --- a/man/new_pillar.Rd +++ b/man/new_pillar.Rd @@ -4,7 +4,7 @@ \alias{new_pillar} \title{Construct a custom pillar object} \usage{ -new_pillar(components, ..., width = NULL, class = NULL, extra = NULL) +new_pillar(components, ..., width = NULL, class = NULL, extra = deprecated()) } \arguments{ \item{components}{A named list of components constructed with \code{\link[=pillar_component]{pillar_component()}}.} @@ -15,8 +15,7 @@ new_pillar(components, ..., width = NULL, class = NULL, extra = NULL) \item{class}{Name of subclass.} -\item{extra}{For compound pillars, indicate the names or indices of the -sub-pillars that could not be shown due to width constraints.} +\item{extra}{Deprecated.} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} From 2c87ee2446f045ac649abfe7dd4c0ba0fb7c7a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Mon, 31 Jan 2022 06:39:56 +0100 Subject: [PATCH 2/3] Import --- NAMESPACE | 2 ++ R/zzz.R | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NAMESPACE b/NAMESPACE index 62c509bf7..3b07f9dbc 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -160,6 +160,8 @@ importFrom(fansi,strip_sgr) importFrom(fansi,substr2_ctl) importFrom(glue,as_glue) importFrom(lifecycle,deprecate_soft) +importFrom(lifecycle,deprecate_warn) +importFrom(lifecycle,is_present) importFrom(utf8,utf8_width) importFrom(utils,head) importFrom(utils,str) diff --git a/R/zzz.R b/R/zzz.R index 7da4068fe..43ede5084 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -3,7 +3,7 @@ #' @import rlang #' @import ellipsis #' @importFrom glue as_glue -#' @importFrom lifecycle deprecate_soft +#' @importFrom lifecycle deprecate_soft deprecate_warn is_present #' @importFrom vctrs data_frame #' @importFrom vctrs new_data_frame #' @importFrom vctrs new_list_of From 215c67468702a32b02d895c76863fd13c0afd2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Tue, 1 Feb 2022 06:36:14 +0100 Subject: [PATCH 3/3] Import --- NAMESPACE | 1 + R/zzz.R | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NAMESPACE b/NAMESPACE index 3b07f9dbc..75c862260 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -161,6 +161,7 @@ importFrom(fansi,substr2_ctl) importFrom(glue,as_glue) importFrom(lifecycle,deprecate_soft) importFrom(lifecycle,deprecate_warn) +importFrom(lifecycle,deprecated) importFrom(lifecycle,is_present) importFrom(utf8,utf8_width) importFrom(utils,head) diff --git a/R/zzz.R b/R/zzz.R index 43ede5084..aa950210f 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -3,7 +3,7 @@ #' @import rlang #' @import ellipsis #' @importFrom glue as_glue -#' @importFrom lifecycle deprecate_soft deprecate_warn is_present +#' @importFrom lifecycle deprecate_soft deprecate_warn is_present deprecated #' @importFrom vctrs data_frame #' @importFrom vctrs new_data_frame #' @importFrom vctrs new_list_of