Skip to content

rlang warnings in ggplot2 unit tests #3552

Closed
@clauswilke

Description

@clauswilke

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 4
p <- ggplot(mtcars) + aes(wt, mpg)
expect_identical(class(p$mapping), "uneval")

Created on 2019-10-05 by the reprex package (v0.3.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions