This describes two problems, but the same change would fix both.
The check in "R CMD check" for use of things like package:::fn appears to work by examining the bodies of functions in the package for calls like that. However, this doesn't detect cases like those reported in https://stackoverflow.com/q/57191965/2554330, where code like
load_config = blogdown:::load_config
is at top level in the package R source. A fix for this would be to parse the R files and examine those expressions for bad use of :::.
The other problem confused the poster. If a function is imported using that method, and that function makes use of :::, then it is reported as an error in the package being checked. In that case the import was
split_yaml_body = blogdown:::split_yaml_body
and was reported as
"Unexported object imported by a ':::' call: ‘knitr:::is_blank’"
because blogdown:::split_yaml_body makes that call, which is legal: both knitr and blogdown have the same maintainer. The same issue would happen if blogdown had exported split_yaml_body and the import was done via
split_yaml_body = blogdown::split_yaml_body
(which I checked by modifying the sources to both packages). This one is harder to fix, though I suppose if the first suggested change is made, it won't be an issue, because the check will never look at the body of split_yaml_body.
This describes two problems, but the same change would fix both.
load_config = blogdown:::load_config
is at top level in the package R source. A fix for this would be to parse the R files and examine those expressions for bad use of :::.
split_yaml_body = blogdown:::split_yaml_body
and was reported as
"Unexported object imported by a ':::' call: ‘knitr:::is_blank’"
because blogdown:::split_yaml_body makes that call, which is legal: both knitr and blogdown have the same maintainer. The same issue would happen if blogdown had exported split_yaml_body and the import was done via
split_yaml_body = blogdown::split_yaml_body
(which I checked by modifying the sources to both packages). This one is harder to fix, though I suppose if the first suggested change is made, it won't be an issue, because the check will never look at the body of split_yaml_body.
METADATA