Biometris / statgenGWAS

See https://biometris.github.io/statgenGWAS for a full description
https://biometris.github.io/statgenGWAS/
12 stars 3 forks source link

Issues with next version of ggplot2 #10

Closed thomasp85 closed 2 years ago

thomasp85 commented 2 years ago

Hi

We are preparing the next release of ggplot2 and our reverse dependency checks show that your package is failing with the new version. I believe the issue is in this line in your test suite:

https://github.com/Biometris/statgenGWAS/blob/8cab202b107bbabad25633d3792d947ff8fe76f5/inst/tinytest/test_plots.R#L121-L122

where ggplot2 now throws a deprecation warning and you expect the plotting to be silent, but I may be wrong

You can install the release candidate of ggplot2 using devtools::install_github('tidyverse/ggplot2@v3.4.0-rc') to test this out.

We plan to submit ggplot2 by the end of October and hope you can have a fix ready before then

Kind regards Thomas

BartJanvanRossum commented 2 years ago

Hi Thomas,

I just checked, but instead of a warning I get an error:

Error in geom_line() : Problem while converting geom to grob.
ℹ Error occurred in the 2nd layer.
Caused by error in `vec_size()`:
! `x` must be a vector, not an environment.

The cause of the problem seems to be in geom_line(). This very basic code is enough for me to replicate it:

library(ggplot2)
dat <- data.frame(x = 1:3, y = 1:3)
ggplot(aes(x = x, y = y), data = dat) +
  geom_line()

Could it be that I need the develop version of some other package as well to get this working?

thomasp85 commented 2 years ago

In that case I think the issue is with the development version of vctrs - I'll check and get back to you

thomasp85 commented 2 years ago

Can you provide a traceback for the error?

BartJanvanRossum commented 2 years ago
> rlang::last_error()
<error/rlang_error>
Error in `geom_line()`:
! Problem while converting geom to grob.
ℹ Error occurred in the 1st layer.
Caused by error in `vec_size()`:
! `x` must be a vector, not an environment.
---
Backtrace:
  1. base (local) `<fn>`(x)
 27. vctrs:::stop_scalar_type(`<fn>`(`<env>`), "x", `<fn>`(vec_size()))
 28. vctrs:::stop_vctrs(...)
thomasp85 commented 2 years ago

thanks - can I get the output of sessioninfo::session_info() as well

BartJanvanRossum commented 2 years ago

Sure:

─ Session info ───────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.2.1 (2022-06-23 ucrt)
 os       Windows 10 x64 (build 19044)
 system   x86_64, mingw32
 ui       RStudio
 language (EN)
 collate  English_United States.utf8
 ctype    English_United States.utf8
 tz       Europe/Berlin
 date     2022-10-11
 rstudio  2022.07.3+578 Spotted Wakerobin (desktop)
 pandoc   2.19.2 @ C:/Program Files/RStudio/bin/quarto/bin/tools/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────────
 package     * version    date (UTC) lib source
 assertthat    0.2.1      2019-03-21 [1] CRAN (R 4.1.3)
 cachem        1.0.6      2021-08-19 [1] CRAN (R 4.1.3)
 callr         3.7.2      2022-08-22 [1] CRAN (R 4.2.1)
 cli           3.4.1      2022-09-23 [1] CRAN (R 4.2.1)
 colorspace    2.0-3      2022-02-21 [1] CRAN (R 4.1.3)
 crayon        1.5.2      2022-09-29 [1] CRAN (R 4.2.1)
 curl          4.3.3      2022-10-06 [1] CRAN (R 4.2.1)
 data.table    1.14.2     2021-09-27 [1] CRAN (R 4.1.3)
 DBI           1.1.3      2022-06-18 [1] CRAN (R 4.2.0)
 devtools      2.4.4      2022-07-20 [1] CRAN (R 4.2.1)
 digest        0.6.29     2021-12-01 [1] CRAN (R 4.1.3)
 dplyr         1.0.10     2022-09-01 [1] CRAN (R 4.2.1)
 ellipsis      0.3.2      2021-04-29 [1] CRAN (R 4.1.3)
 evaluate      0.17       2022-10-07 [1] CRAN (R 4.2.1)
 fansi         1.0.3      2022-03-24 [1] CRAN (R 4.1.3)
 farver        2.1.1      2022-07-06 [1] CRAN (R 4.2.1)
 fastmap       1.1.0      2021-01-25 [1] CRAN (R 4.1.3)
 fs            1.5.2      2021-12-08 [1] CRAN (R 4.1.3)
 generics      0.1.3      2022-07-05 [1] CRAN (R 4.2.1)
 ggplot2     * 3.3.6.9000 2022-10-11 [1] Github (tidyverse/ggplot2@6425de8)
 glue          1.6.2      2022-02-24 [1] CRAN (R 4.1.3)
 gtable        0.3.1      2022-09-01 [1] CRAN (R 4.2.1)
 htmltools     0.5.3      2022-07-18 [1] CRAN (R 4.2.1)
 htmlwidgets   1.5.4      2021-09-08 [1] CRAN (R 4.1.3)
 httpuv        1.6.6      2022-09-08 [1] CRAN (R 4.2.1)
 knitr         1.40       2022-08-24 [1] CRAN (R 4.2.1)
 labeling      0.4.2      2020-10-20 [1] CRAN (R 4.1.1)
 later         1.3.0      2021-08-18 [1] CRAN (R 4.1.3)
 lattice       0.20-45    2021-09-22 [2] CRAN (R 4.2.1)
 lifecycle     1.0.3      2022-10-07 [1] CRAN (R 4.2.1)
 magrittr      2.0.3      2022-03-30 [1] CRAN (R 4.1.3)
 Matrix        1.5-1      2022-09-13 [1] CRAN (R 4.2.1)
 memoise       2.0.1      2021-11-26 [1] CRAN (R 4.1.3)
 mime          0.12       2021-09-28 [1] CRAN (R 4.1.1)
 miniUI        0.1.1.1    2018-05-18 [1] CRAN (R 4.1.3)
 munsell       0.5.0      2018-06-12 [1] CRAN (R 4.1.3)
 pillar        1.8.1      2022-08-19 [1] CRAN (R 4.2.1)
 pkgbuild      1.3.1      2021-12-20 [1] CRAN (R 4.2.0)
 pkgconfig     2.0.3      2019-09-22 [1] CRAN (R 4.1.3)
 pkgload       1.3.0      2022-06-27 [1] CRAN (R 4.2.1)
 prettyunits   1.1.1      2020-01-24 [1] CRAN (R 4.1.3)
 processx      3.7.0      2022-07-07 [1] CRAN (R 4.2.1)
 profvis       0.3.7      2020-11-02 [1] CRAN (R 4.1.3)
 promises      1.2.0.1    2021-02-11 [1] CRAN (R 4.1.3)
 ps            1.7.1      2022-06-18 [1] CRAN (R 4.2.0)
 purrr         0.3.5      2022-10-06 [1] CRAN (R 4.2.1)
 R6            2.5.1      2021-08-19 [1] CRAN (R 4.1.3)
 Rcpp          1.0.9      2022-07-08 [1] CRAN (R 4.2.1)
 remotes       2.4.2      2021-11-30 [1] CRAN (R 4.1.3)
 rlang         1.0.6      2022-09-24 [1] CRAN (R 4.2.1)
 rmarkdown     2.17       2022-10-07 [1] CRAN (R 4.2.1)
 rprojroot     2.0.3      2022-04-02 [1] CRAN (R 4.1.3)
 rstudioapi    0.14       2022-08-22 [1] CRAN (R 4.2.1)
 scales        1.2.1      2022-08-20 [1] CRAN (R 4.2.1)
 sessioninfo   1.2.2      2021-12-06 [1] CRAN (R 4.1.3)
 shiny         1.7.2      2022-07-19 [1] CRAN (R 4.2.1)
 statgenGWAS * 1.0.8.9000 2022-07-06 [1] local
 stringi       1.7.8      2022-07-11 [1] CRAN (R 4.2.1)
 stringr       1.4.1      2022-08-20 [1] CRAN (R 4.2.1)
 tibble        3.1.8      2022-07-22 [1] CRAN (R 4.2.1)
 tidyselect    1.2.0      2022-10-10 [1] CRAN (R 4.2.1)
 tinytest    * 1.3.1      2021-07-06 [1] CRAN (R 4.1.1)
 urlchecker    1.0.1      2021-11-30 [1] CRAN (R 4.2.0)
 usethis       2.1.6      2022-05-25 [1] CRAN (R 4.2.0)
 utf8          1.2.2      2021-07-24 [1] CRAN (R 4.1.3)
 vctrs         0.4.2      2022-09-29 [1] CRAN (R 4.2.1)
 withr         2.5.0      2022-03-03 [1] CRAN (R 4.1.3)
 xfun          0.33       2022-09-12 [1] CRAN (R 4.2.1)
 xtable        1.8-4      2019-04-21 [1] CRAN (R 4.1.3)
 yaml          2.3.5      2022-02-21 [1] CRAN (R 4.1.2)

 [1] C:/ProgramData/R/libs4
 [2] C:/Program Files/R/R-4.2.1/library

──────────────────────────────────────────────────────────────────────────────────
thomasp85 commented 2 years ago

Can I get you to install the dev version of vctrs, restart the session and try again

BartJanvanRossum commented 2 years ago

That does fix the error message and now raises the deprecation warning you mentioned in the original post. I will make sure to fix that.

thomasp85 commented 2 years ago

Great - you can assume vctrs will be released before ggplot2

BartJanvanRossum commented 2 years ago

Fixed in version 1.0.9