Skip to content
Prev 19352 / 21312 Next

[Bioc-devel] SpatialExperiment checks fail on Windows platform

Hi Dario,

Note that we observe the same problem on our daily Windows builder, so 
this has not much to do with your GitHub actions setup:

https://bioconductor.org/checkResults/3.17/bioc-LATEST/SpatialExperiment/palomino3-buildsrc.html

It looks to me that some recent changes to the package broke the dim() 
method for StoredSpatialImage objects. Here is how the method is defined 
in BioC devel:

 > selectMethod("dim", "StoredSpatialImage")
Object with tracing code, class "MethodDefinitionWithTrace"
Original definition:
Method Definition:

function (x)
{
 ??? src <- imgSource(x)
 ??? src <- normalizePath(src)
 ??? src <- paste0("file://", src)
 ??? img <- .get_from_cache(src, NULL)
 ??? if (!is.null(img))
 ??????? return(dim(img))
 ??? img <- image_read(src)
 ??? tib <- image_info(img)
 ??? c(tib$height, tib$width)
}
<bytecode: 0x55a3f2dee5b8>
<environment: namespace:SpatialExperiment>

Signatures:
 ??????? x
target? "StoredSpatialImage"
defined "StoredSpatialImage"

## (to see the tracing code, look at body(object))

I'm not sure I understand the logic for prefixing the already normalized 
local path with "file://", but this breaks magick::image_read() on 
Windows. Without the "file://" prefix, the dim() method seems to work 
fine on all platforms.

Hope this helps,

H.
On 12/12/2022 02:11, Dario Righelli wrote: