r-lib / vdiffr

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

vdiffr causing github actions to fail on R-dev #101

Closed aghaynes closed 3 years ago

aghaynes commented 3 years ago

I found your package recently and am starting to use it for testing a package I'm involved in. I made a first PR today and while the tests with the latest R version pass on all platforms (win, ubuntu, mac), vdiffr causes the tests on the dev R versions to fail (the issue with mac is probably just a transient one (package not available or somesuch)).

On windows dev, I get the following output from the log where the difference is in polyline a fill:none argument and it looks like the line "59.04,50 : 2.56" has been removed too.

Failed doppelganger: cumulative-xlabn (../figs//cumulative-xlabn.svg)

< before                                                                        
> after                                                                         
@@ 14,5 / 14,5 @@                                                               
  <rect width='100%' height='100%' style='stroke: none; fill: #FFFFFF;'/>       
  <text transform='translate(12.96,329.15) rotate(-90)' style='font-size: 12.00p
  x; font-family: Liberation Sans;' textLength='96.70px' lengthAdjust='spacingAn
  dGlyphs'>Recruited patients</text>                                            
< <polyline points='59.04,502.56 689.76,502.56 689.76,59.04 59.04,59.04 59.04,50
: 2.56 ' style='stroke-width: 0.75;' />                                         
> <polygon points='59.04,502.56 689.76,502.56 689.76,59.04 59.04,59.04 ' style='
: stroke-width: 0.75; fill: none;' />                                           
  <line x1='157.27' y1='502.56' x2='576.55' y2='502.56' style='stroke-width: 0.7
  5;' />                                                                        
  <line x1='157.27' y1='502.56' x2='157.27' y2='509.76' style='stroke-width: 0.7
  5;' />                                     

I had a quick look at the news file for R but don't see anything relevant...

Do you have any thoughts? Thanks!

lionel- commented 3 years ago

Duplicate of #86 (now pinned).

The snapshot cases will have to be recomputed for R 4.1. If you look at the failing platforms they are all r-devel. You can set teh CI envvar to false on those platforms to disable vdiffr failures until the next version of vdiffr is released (in April around R 4.1).