devtools::check
fails after use_catch()
without (undocumented) fix
#1235
Labels
devtools::check
fails after use_catch()
without (undocumented) fix
#1235
I got the somewhat unexpected result after the last update of testthat to 3.0.0 that
R CMD CHECK
failed for my package which uses Catch due to the new test methods for compiled code and the following line in particular:testthat/R/test-compiled-code.R
Line 34 in 45a9c70
While this can be fixed by adding
Suggests: xml2
to the DESCRIPTION file of my own package, this is undocumented and can only be discovered by getting the error or looking up the code directly. I suggest to either document this dependency inrun_cpp_tests
and adding a message touse_catch
or placing xml2 again in the imports of testthat. As a user of the Catch-feature, the first approach seems a little unnatural to me as I am not using the xml2 package directly and it seems to be more of an implementation detail of testthat, but I understand that xml2 might be an unnecessary dependency for most testthat users.Here is a reprex using the usethis workflow:
Created on 2020-11-16 by the reprex package (v0.3.0)
Session info
The text was updated successfully, but these errors were encountered: