Closed mbjones closed 1 year ago
Current check()
on R 4.2.2 also produces a NOTE:
❯ checking R code for possible problems ... NOTE
Found if() conditions comparing class() to string:
File ‘redland/R/Statement.R’: if ((is.null(subject) || class(subject) == "character") && class(predicate) == "character" && (is.null(object) || class(object) == "character")) ...
File ‘redland/R/util.R’: if (class(pointer) != "externalptr") ...
Use inherits() (or maybe is()) instead.
I fixed this using inherits()
rather than the buggy string comparison. So now we change (class(subject) == "character")
to inherits(subject, "character")
. I merged this to develop in sha a8e6d127, but there is still more to do on the other warnings.
Another WARNING has been because roxygen2
7.0.0 changed its method signature for process_roclet
to remove the global_options
argument, which is a backwards incompatible change. Possibly to be fixed by changing our signature as well. Needs investigation.
The folks at CRAN release a new version (1.0.17-16.1) which patches the void
problems that we were having with redland.c. Here's what they changed, which I will incorporate into the next release:
--- redland.c 2023-05-22 17:20:49.000000000 -0800
+++ ../../redland-1.0.17-16.1/src/redland.c 2023-05-13 00:47:08.000000000 -0800
@@ -768,7 +768,7 @@
SWIGRUNTIME SEXP
-R_SWIG_debug_getCallbackFunctionData()
+R_SWIG_debug_getCallbackFunctionData(void)
{
int n, i;
SEXP ans;
@@ -814,7 +814,7 @@
}
SWIGRUNTIME RCallbackFunctionData *
-R_SWIG_getCallbackFunctionData()
+R_SWIG_getCallbackFunctionData(void)
{
if(!callbackFunctionDataStack) {
Rf_error("Supposedly impossible error occurred in the SWIG callback mechanism."
@@ -1843,7 +1843,7 @@
SWIGEXPORT SEXP
-R_swig_librdf_new_world ( )
+R_swig_librdf_new_world ( void)
{
librdf_world *result = 0 ;
unsigned int r_nprotect = 0;
Trying to fix the roclet signature change described above by removing the global_options param, which wasn't used anyways and is no longer in process_roclet
:
diff --git a/R/redland/R/mergeNamespace_roclet.R b/R/redland/R/mergeNamespace_roclet.R
index 9e10c19..f802333 100644
--- a/R/redland/R/mergeNamespace_roclet.R
+++ b/R/redland/R/mergeNamespace_roclet.R
@@ -52,9 +52,8 @@ mergeNamespace_roclet <- function(x, ...) {
#' @param blocks the documentation blocks
#' @param env the current env
#' @param base_path the top directory of the R package
-#' @param global_options unused by this roclet
#' @export
-roclet_process.roclet_mergeNamespace <- function(x, blocks, env, base_path, global_options = list()) {
+roclet_process.roclet_mergeNamespace <- function(x, blocks, env, base_path) {
#on.exit(detach(".redland-temp"))
#attach(NULL, name=".redland-temp")
tmpEnv <- new.env()
Had to remove the global_options
param from the Rd file as well, then that worked. So, documentation now is updated, but note that we currently can't run the doc generation from document()
due to errors with the SWIG doc generation. Will have to open a new issue for this later.
All problems are now fixed, ready to close if the release is accepted.
Got this message from CRAN today:
Having it removed from CRAN would impact dependent packages such as dataone and datapack. The warnings currently are: