You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The autogenerated cpp11.cpp file is leading to run_testthat_tests() being defined twice. In particular, in my rar package it's defined here in cpp11.cpp:
This is leading to a violation of the C++ One Definition Rule when I compile this code on Fedora. (And presumably other platforms as well.) I've received the advice to simply include the testthat.h header in the cpp11.cpp file, but since it's autogenerated, I think this is a bug. (I'm pretty new to R package development, so my apologies in advance if this is actually user error.)
The text was updated successfully, but these errors were encountered:
In case anyone finds this in the future because they're dealing with the same problem, the issue actually seems to be with tools::package_native_routine_registration_skeleton(), which generates the wrong signature for some reason in R 4.3.2. See this bug report, as well as this patch in Rcpp. This thread on the r-package-devel list which includes some workarounds.
The autogenerated
cpp11.cpp
file is leading torun_testthat_tests()
being defined twice. In particular, in myrar
package it's defined here incpp11.cpp
:and in the
testthat.h
header:This is leading to a violation of the C++ One Definition Rule when I compile this code on Fedora. (And presumably other platforms as well.) I've received the advice to simply include the
testthat.h
header in thecpp11.cpp
file, but since it's autogenerated, I think this is a bug. (I'm pretty new to R package development, so my apologies in advance if this is actually user error.)The text was updated successfully, but these errors were encountered: