-
Notifications
You must be signed in to change notification settings - Fork 339
Description
-
I have some examples that make sure to not run if the active graphics device is
pdf()
in order to avoid triggering_R_CHECK_MBCS_CONVERSION_FAILURE_
issues with CRAN's R CMD check. -
Previously these examples would show up in my
{pkgdown}
websites since it seems that previously{pkgdown}
would record examples usingragg::agg_png()
:- e.g. in this line of
highlight_examples()
thedevice
option is hardcoded toragg::agg_png()
with the intention that this device will be used to record the examples:Line 18 in 66477c0
device = function(...) ragg::agg_png(..., bg = bg),
- e.g. in this line of
-
However these examples no longer show up in my
{pkgdown}
websites since it seems that now examples are de facto now actually being recorded usingpdf(NULL)
:- Looking at the code it seems this is because upstream in
{evaluate}
they changed the code to no longer use the device set by thedevice
option but to instead to always usepdf(NULL)
:
- Looking at the code it seems this is because upstream in
-
This issue is similar to Record example plots with device requested in
figures
field instead ofragg::agg_png()
#2299 in that there is a "problem" because the graphics device being used to record the example is a different device from the one being used to render the example and there are cases where one may want to skip the recording graphics device but not skip the rendering graphics device. -
I did notice that the development version of {ragg} recently added the
agg_record()
graphics device which doesn't create any files and seems optimized for recording figure examples and (after release) I speculate it may be a better choice for recording examples thanpdf(NULL)
: r-lib/ragg@de052f5