diff --git a/.Rbuildignore b/.Rbuildignore index 757f224..b60a653 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,3 +12,4 @@ docs/ ^.clang-format$ ^Makefile$ extradata/ +revdep/ diff --git a/.gitignore b/.gitignore index 5288457..2eec536 100644 --- a/.gitignore +++ b/.gitignore @@ -7,9 +7,9 @@ src/*.so src/*.dll .DS_Store extradata/ - *.status config.log autom4te.cache - src/Makevars +revdep +.Rprofile diff --git a/DESCRIPTION b/DESCRIPTION index 84af438..804ec89 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -40,9 +40,9 @@ License: GPL (>= 2) Encoding: UTF-8 LazyData: true ByteCompile: true -Depends: R (>= 3.6.0), methods, MatrixExtra (>= 0.1.7) -Imports: - Matrix (>= 1.3), +Depends: R (>= 3.6.0), methods, Matrix (>= 1.3) +Imports: + MatrixExtra (>= 0.1.7), Rcpp (>= 0.11), data.table (>= 1.10.0), float (>= 0.2-2), diff --git a/NAMESPACE b/NAMESPACE index a8e4f9e..256e1f9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -13,7 +13,6 @@ export(ndcg_k) export(soft_impute) export(soft_svd) import(Matrix) -import(MatrixExtra) import(Rcpp) import(data.table) import(float) diff --git a/R/zzz.R b/R/zzz.R index 9a86bcc..6b5a4f7 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -1,10 +1,9 @@ #' @import methods -#' @import Matrix #' @importFrom stats rnorm #' @import data.table #' @import Rcpp #' @import float -#' @import MatrixExtra +#' @import Matrix #' @importFrom RhpcBLASctl get_num_cores #' @useDynLib rsparse, .registration = TRUE diff --git a/cran-comments.md b/cran-comments.md index e62312e..3a43fd6 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,6 @@ -# New release +# Resubmission -- fixed autoconf 2.71 warnings +- fixed pkg imports to not break dependencies # Test environments @@ -9,10 +9,4 @@ # R CMD check results -0 errors | 0 warning | 1 notes - -> File ‘rsparse/libs/rsparse.so’: - Found ‘__ZNSt3__14cerrE’, possibly from ‘std::cerr’ (C++) - Objects: ‘wrmf_explicit.o’, ‘wrmf_implicit.o’ - -this is spurious NOTE, we don't touch stderr. +0 errors | 0 warning | 0 notes diff --git a/inst/include/nnls.hpp b/inst/include/nnls.hpp index e0bd9c1..48037ea 100644 --- a/inst/include/nnls.hpp +++ b/inst/include/nnls.hpp @@ -1,4 +1,9 @@ +#ifdef RSPARSE_R_PKG +#include +#else #include +#endif + #define EPS 1e-16 diff --git a/inst/include/wrmf.hpp b/inst/include/wrmf.hpp index 0840aba..1494917 100644 --- a/inst/include/wrmf.hpp +++ b/inst/include/wrmf.hpp @@ -1,4 +1,9 @@ +#ifdef RSPARSE_R_PKG +#include +#else #include +#endif + #include "mapped_csc.hpp" #include "mapped_csr.hpp" diff --git a/src/Makevars.in b/src/Makevars.in index ab8408c..2775913 100644 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -1,4 +1,4 @@ -PKG_CPPFLAGS = -DARMA_32BIT_WORD -I../inst/include/ +PKG_CPPFLAGS = -DARMA_32BIT_WORD -I../inst/include/ -DRSPARSE_R_PKG -DARMA_NO_DEBUG PKG_CXXFLAGS = @OPENMP_FLAG@ PKG_LIBS = @OPENMP_FLAG@ @FLOAT_LIBS@ $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/src/Makevars.win b/src/Makevars.win index 3c5fdce..2cf0426 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,7 +1,7 @@ R_SCMD = ${R_HOME}/bin${R_ARCH_BIN}/Rscript -e FLOAT_LIBS = $(shell ${R_SCMD} "float:::ldflags()") -PKG_CPPFLAGS = -I../inst/include/ -DARMA_32BIT_WORD -DARMA_DONT_USE_BLAS -DARMA_NO_DEBUG +PKG_CPPFLAGS = -I../inst/include/ -DARMA_32BIT_WORD -DARMA_DONT_USE_BLAS -DARMA_NO_DEBUG -DRSPARSE_R_PKG PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(FLOAT_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)