r-lib / vdiffr

Visual regression testing and graphical diffing with testthat
https://vdiffr.r-lib.org
Other
185 stars 31 forks source link

Error on Ubuntu-devel: `Graphics API version mismatch` #129

Closed IndrajeetPatil closed 1 year ago

IndrajeetPatil commented 1 year ago

I am seeing tests using {vdiffr} fail only on Ubuntu for R-devel (failure log):

Error in `svglite_(filename, bg, width, height, pointsize, standalone, 
    always_valid)`: Graphics API version mismatch

I am assuming this has to do with the following change in R-devel:

The graphics engine version, R_GE_version, has been bumped to 15 and so packages that provide graphics devices should be reinstalled.

Should I just be skipping these tests on R-devel until {vdiffr} is updated on CRAN?

yutannihilation commented 1 year ago

If you read the change log carefully, you can find the change is not in R-devel, but in R 4.2.0.

yutannihilation commented 1 year ago

Oh, but it seems you are right. The version is no 16.

https://github.com/wch/r-source/blob/452e9b5ab5973af6e271b70dcad1505451acdd93/src/include/R_ext/GraphicsEngine.h#L88-L91

I think you can just clear the cache of the setup-r-dependencies action since the problem is probably that your vdiffr was compiled with an outdated version of R.

IndrajeetPatil commented 1 year ago

Thanks, @yutannihilation!

Can confirm that clearing the cache and then recompiling {vdiffr} on R-devel solves the issue.