aryoda / tryCatchLog

R package for better error handling incl. logging with a full (!) stack trace incl. line numbers, post-mortem analysis and support for parallel processing
Other
73 stars 8 forks source link

Fix note in CRAN Package Check Results (there are ::: calls to the package's namespace in its code) #80

Open aryoda opened 1 year ago

aryoda commented 1 year ago

The current check results of the released tryCatchLog version shows the same note in all develop and patched versions of R:

Version: 1.3.1 Check: dependencies in R code Result: NOTE There are ::: calls to the package's namespace in its code. A package almost never needs to use ::: for its own objects: ‘log2console’ Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-macos-arm64, r-devel-macos-x86_64, r-devel-windows-x86_64, r-patched-linux-x86_64

Fix this and prepare a new release for CRAN.

aryoda commented 1 year ago

I think this code causes the check note:

https://github.com/aryoda/tryCatchLog/blob/7943c0ec1e1064208f16fd6be59e718d1916610f/R/set_logging_functions.R#L55-L58

Since this function is exported (= public API) it should have never used an "internal" call (to tryCatchLog:::log2console) in the signature so it is good to fix this now...

TODO: tryCatchLog:::log2console is not yet exported which is required to use tryCatchLog::log2console now instead:

https://github.com/aryoda/tryCatchLog/blob/7943c0ec1e1064208f16fd6be59e718d1916610f/R/log2console.R#L34