YuLab-SMU / ggtree

:christmas_tree:Visualization and annotation of phylogenetic trees
https://yulab-smu.top/treedata-book/
830 stars 172 forks source link

Installation error: Error in get(x, envir = ns, inherits = FALSE) : object 'warning_wrap' not found #541

Closed HenrikBengtsson closed 1 year ago

HenrikBengtsson commented 1 year ago

With all CRAN and Bioconductor packages up-to-date, I get the following installation error on R 4.2.2 with Bioconductor 3.16:

> BiocManager::install("ggtree")
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: https://cloud.r-project.org
    BioCsoft: https://bioconductor.org/packages/3.16/bioc
    BioCann: https://bioconductor.org/packages/3.16/data/annotation
    BioCexp: https://bioconductor.org/packages/3.16/data/experiment
    BioCworkflows: https://bioconductor.org/packages/3.16/workflows
    BioCbooks: https://bioconductor.org/packages/3.16/books

Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31)
Installing package(s) 'ggtree'
trying URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/ggtree_3.6.0.tar.gz'
Content type 'application/x-gzip' length 359194 bytes (350 KB)
==================================================
downloaded 350 KB

* installing *source* package ‘ggtree’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in get(x, envir = ns, inherits = FALSE) : 
  object 'warning_wrap' not found
Error: unable to load R code in package ‘ggtree’
Execution halted

This is because ggtree import at least two non-existing functions from ggplot2:

https://github.com/YuLab-SMU/ggtree/blob/403d9f6b3ac69766c019e8ab72abafeda3f8333b/R/geom_hilight.R#L477-L480

I'm really surprised that this is not picked up by the Bioc check servers;

HenrikBengtsson commented 1 year ago

I'm really surprised that this is not picked up by the Bioc check servers;

Surprise gone; ggplot2 3.4.0 was released today.

HenrikBengtsson commented 1 year ago

FYI, this looks urgent because it's breaking quite a few packages on CRAN and Bioconductor.

CRAN packages that will break immediately:

$ wget https://cran.r-project.org/src/contrib/PACKAGES
$ grep -B 4 -E "Imports:.*ggtree" PACKAGES | grep -E "(Package:|ggtree)"
Package: ggmotif
Imports: tidyverse, dplyr, XML, magrittr, ggplot2, stringr, ggtree,
Package: harrietr
Imports: ape (>= 4.1), ggtree (>= 1.8.1), magrittr (>= 1.5), lazyeval
Package: Platypus
Imports: BiocGenerics, Biostrings, cowplot, dplyr, ggplot2, ggtree,
Package: STraTUS
Imports: ape, phangorn, igraph, gmp, ggplot2, ggtree (>= 2.0.0),
Package: SurvivalPath
Imports: ggplot2, ggtree, treeio, dplyr, rms, survival, survminer,
Package: Sysrecon
Imports: ape, dplyr, ggplot2, ggtree, methods, patchwork, plyr,

I'm quite sure the maintainers of these package will get a two-week noticed from CRAN rather soon about removal. I think also the maintainers of their reverse dependencies will get a heads-up that their packages will be dropped as a side effect.

Eventually will also the following soft reverse dependencies:

$ grep -B 5 -E "Suggests:.*ggtree" PACKAGES | grep -E "(Package:|ggtree)"
Package: aplot
Suggests: ggtree
Package: CoOL
Suggests: ggtree, imager
Package: ggimage
Suggests: ape, ggtree, gridGraphics, httr, rsvg
Package: idiogramFISH
Suggests: rentrez, ggplot2, ggpubr, ggtree, phytools, treeio,
Package: PCMBase
Suggests: testthat, knitr, rmarkdown, abind, ggtree, cowplot, covr,
Package: rhierbaps
Suggests: knitr, rmarkdown, ggtree, phytools, testthat, formatR
Package: treestructure
Suggests: ggtree,ggplot2,knitr
Package: yatah
Suggests: dplyr, ggtree, knitr, rmarkdown, spelling, testthat (>=

I'm curious, did you get a email from the ggplot2 maintainers that your package breaks with ggplot2 3.4.0? I'd expect so, because they tend to run revdep checks, but maybe they didn't because you imported these internal functions.