Closed hpages closed 2 years ago
Hi @hpages - sorry, I missed your issue. Thank you very much for the detailed description of the issue. I think the easiest for now, to sort the longstanding issues, is to got with suggestion number 4, as I won't have to time to explore further. I'll commit right away.
ping @sgibb
Cher Laurent,
As you're probably aware the
fragmentmatching.Rmd
vignette in synapter has failed to build on Ubuntu 20.04.4 LTS for about a year now (or maybe more). See:As a consequence synapter and synapterdata have not been available via
BiocManager::install()
for a while.Note that I can reproduce the error we see in the above reports in an interactive session on Linux builders nebbiolo1 and nebbiolo2 (running BioC 3.15 and 3.16, respectively, on Ubuntu 20.04), with the following simple command:
This is also reproducible on the Bioconductor docker images (
bioconductor/bioconductor_docker:RELEASE_3_15
andbioconductor_docker:devel
) after installing a bunch of extra stuff with:This suggests that the problem is not caused by some sort of misconfiguration of the build machines but is rather due to a failed attempt by knitr to crop some image with
magick::image_trim()
before its inclusion in the vignette. More precisely, the error seems to occur in theknitr::plot_crop()
function which uses the following logic (this is in knitr 1.40.1):Interestingly, if the magick package is not available,
knitr::plot_crop()
doesn't try to crop the image and just issues a message.This suggests a few possible ways to tackle the issue:
.Rmd
vignettes or knitr so I don't know if there's a way to tell knitr to not crop an image and to include it as-is, but that would be one way to go.magick::image_trim()
in atry()
statement and haveknitr::plot_crop()
not do anything if an error is returned. It could just display a message in that case like it does when magick is not available.magick::image_trim()
. A little bit more investigation would probably be needed to isolate the problematic image and to understand whymagick::image_trim()
fails to trim it in the first place. Could it be that a regression got introduced in the latest version of the magick package? (Version 2.7.3, published on CRAN in August 2021.) This might require involving the magick/ImageMagick folks/community.BiocStyle::html_document()
withrmarkdown::html_document()
, probably because the latter allows a wider body in the rendered HTML so doesn't need to crop the image in order to make it fit. This would be the easiest fix if you don't mind loosing the fancy BiocStyle layout.Hope this helps,
H.
P.S.: As a side note, rmarkdown and knitr should typically be in
Suggests:
. There's usually no need to import them.