You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our build process, I recently replaced some code that shelled out to R CMD check with devtools::check_built(). Errors started happening, but I couldn't reproduce them when I fired up RStudio and did check_built() from there.
It turns out that check_built() is modifying the default for its error_on argument in an undocumented way - if the build is happening in a non-interactive session, it defaults to "error", otherwise it acts as documented (defaults to "never").
The current docs (version 2.4.5):
error_on
Whether to throw an error on R CMD check failures. Note that the check is always completed
(unless a timeout happens), and the error is only thrown after completion. If "never", then
no errors are thrown. If "error", then only ERROR failures generate errors. If "warning", then
WARNING failures generate errors as well. If "note", then any check failure generated an error.
Its default can be modified with the RCMDCHECK_ERROR_ON environment variable. If that is
not set, then "never" is used.
It's probably also worth mentioning that RCMDCHECK_ERROR_ON doesn't seem to be consulted either?
My inclination for a fix would be to change the code rather than the docs (for error_on - I have no opinion on RCMDCHECK_ERROR_ON), because it can be mysterious when a pipeline does one thing while interactive code does another.
The text was updated successfully, but these errors were encountered:
In our build process, I recently replaced some code that shelled out to
R CMD check
withdevtools::check_built()
. Errors started happening, but I couldn't reproduce them when I fired up RStudio and didcheck_built()
from there.It turns out that
check_built()
is modifying the default for itserror_on
argument in an undocumented way - if the build is happening in a non-interactive session, it defaults to"error"
, otherwise it acts as documented (defaults to"never"
).The current docs (version 2.4.5):
The current code:
It's probably also worth mentioning that
RCMDCHECK_ERROR_ON
doesn't seem to be consulted either?My inclination for a fix would be to change the code rather than the docs (for
error_on
- I have no opinion onRCMDCHECK_ERROR_ON
), because it can be mysterious when a pipeline does one thing while interactive code does another.The text was updated successfully, but these errors were encountered: