You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the ggplot2 unit tests, I get two rlang warnings. Does anybody else see this? Is this a misconfiguration on my end or is something not quite right with the test or the code base?
==> devtools::test()
Loading ggplot2
Testing ggplot2
✔ | OK F W S | Context
✔ | 1 2 | Adding plot elements
───────────────────────────────────────
test-add.R:4: warning: mapping class is preserved when adding uneval objects
Subsetting quosures with `[[` is deprecated as of rlang 0.4.0
Please use `quo_get_expr()` instead.
This warning is displayed once per session.
test-add.R:4: warning: mapping class is preserved when adding uneval objects
Subsetting quosures with `[` is deprecated as of rlang 0.4.0
Please use `quo_get_expr()` instead.
This warning is displayed once per session.
───────────────────────────────────────
✔ | 14 | test-aes-calculated.r
✔ | 9 | Aesthetics (grouping) [0.4 s]
✔ | 10 | Aes - setting values [0.5 s]
...
Strangely, I cannot reproduce these warnings in a reprex:
library(ggplot2)
library(testthat)
# the test from test-add.R, line 4p<- ggplot(mtcars) + aes(wt, mpg)
expect_identical(class(p$mapping), "uneval")
This seems because rlang:: signal_soft_deprecated() behaves differently when it runs in testthat environment.
#' * `signal_soft_deprecated()` warns only if called from the global
#' environment (so the user can change their script) or from the
#' package currently being tested (so the package developer can fix
#' the package).
Have anyone successfully identified where the calls occur? I can only provoke these during testing, not by replaying the tests in the console, and searching for [[ is pretty hopeless
Activity
karawoo commentedon Oct 6, 2019
I see this too when I run the tests locally, and also can't reproduce outside of running the tests.
yutannihilation commentedon Oct 7, 2019
This seems because
rlang:: signal_soft_deprecated()behaves differently when it runs in testthat environment.https://github.com/r-lib/rlang/blob/1f65d7c79315eee74b17991d289edeea6626467f/R/compat-lifecycle.R#L90-L98
thomasp85 commentedon Oct 7, 2019
Have anyone successfully identified where the calls occur? I can only provoke these during testing, not by replaying the tests in the console, and searching for
[[is pretty hopelessyutannihilation commentedon Oct 7, 2019
It says
strip_dots(). So, probably here?Created on 2019-10-07 by the reprex package (v0.3.0)
Handle a quosure properly. Closes tidyverse#3552
Handle a quosure properly. Closes #3552 (#3597)
lock commentedon May 5, 2020
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/