xiangpin / ggstar

:star: star layer for ggplot2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with next version of ggplot2

thomasp85 opened this issue · comments

Hi

We preparing the next release of ggplot2 and our reverse dependency checks show that your package is failing with the new version. Looking into it we see that your package somehow includes references to ggplot2 code from when it was build, which causes the check to emit the "Import not declared from..." error. Please see https://www.tidyverse.org/blog/2022/09/playing-on-the-same-team-as-your-dependecy/ for some more info about why this can cause issues.

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

Thank you, it seems the cli package cause, which was imported by ggplot2 (but it was used by cli::cli_abort etc) but not used in ggstar. I added it to the import field of DESCRIPTION, and the issue was solved. But I think it might be better to declare the function (cli_abort, cli_warn etc.) of cli.

The issue is that ggstar is importing ggplot2 code at build time as discussed in the article above

manual_scale <- getFromNamespace("manual_scale", "ggplot2")

The cli warnings are a symptom of this but the cause should get fixed

Ok, Thank you, I get it.