New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
object 'testthat_print' not found #1112
Comments
|
Thanks for the heads up. I should probably have conditioned the registration on the testthat version. |
|
Thanks for catching this @r2evans ! I've also noticed all the "Error in get(genname, envir = envir) : object 'testthat_print' not found" messages lately and had no idea where they're coming from, finally decided to google it and found your info :) |
|
It can probably be inferred from @r2evans fantastic synopsis (thank you!), but for those who are in a situation where it is inconvenient or difficult to upgrade testthat, rlang 0.4.9 does not have this issue when used with previous versions of testthat. |
|
Confirming that |
|
Thanks for documenting the issue and the solution @r2evans! Judging from the emojis this is a commonly googled annoyance. Conditioning the registration on the testthat version is tricky because loading rlang should not load testthat. Maybe we should just ignore the registration request in |
|
Same issue! I just reinstalled the "testthat" pkg again and then the problem has gone. remove.packages("testthat) |
There is no code change required for this issue, just awareness of the source of the problem and its fix. Whether you blog it or tweet it or just keep this issue open and pinned for a while is up to you.
The Fix
Update
testthatto 3.0.0 or newer.If you haven't upgraded to
rlang-0.4.10yet, when you do, make sure you include"Suggests"in thedependencies=argument, as in(That includes 14 packages, it's possible one or more will be new to you.)
Background
Stemming from r-lib/devtools#2309, the issue arises because
rlangcan be updated while ignoring some of its dependencies.Specifically,
testthat::testthat_printwas added (r-lib/testthat@07b19c8) before testthat3 was released.rlangstarted using it around the same time (bfb1d41), before it released rlang-0.4.10. So far, so good.Unfortunately,
testthatis in rlang'sSuggests:, and the default forinstall.packagesisdependencies=NAwhich only considersc("Depends", "Imports", "LinkingTo").The text was updated successfully, but these errors were encountered: