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
I am developing an R package that uses JSON for Modern C++ (placed in src/include/json.hpp and included with #include "include/json.hpp".) My issue is that devtools::check() warns about pragma(s) suppressing important diagnostics:
From what I can gather from Section 8 in R Internals, this is controlled by the environment variable _R_CHECK_PRAGMAS_, which defaults to FALSE for non-CRAN checks but TRUE for CRAN checks.
I get the warning even though NOT_CRAN is true when testing locally. I also get the warning even when I explicitly set this environment variable to FALSE, and also set NOT_CRAN to true, like so:
That doesn't have anything to do with cpp11 FWIW, so there is nothing for us to do on our end.
The "right" thing to do (even though it stinks) is to go in and hand modify json.hpp to remove those pragmas if possible. But there are 9 of them and that sounds super annoying for you. You didn't hear it from me, but you can probably change them from #pragma to # pragma (note the space) and that might turn the warning off...
I am developing an R package that uses JSON for Modern C++ (placed in
src/include/json.hpp
and included with#include "include/json.hpp"
.) My issue is thatdevtools::check()
warns about pragma(s) suppressing important diagnostics:From what I can gather from Section 8 in R Internals, this is controlled by the environment variable
_R_CHECK_PRAGMAS_
, which defaults toFALSE
for non-CRAN checks butTRUE
for CRAN checks.I get the warning even though
NOT_CRAN
istrue
when testing locally. I also get the warning even when I explicitly set this environment variable toFALSE
, and also setNOT_CRAN
totrue
, like so:The environment variables are picked up, but I still get the warning:
...
I raised this issue on Posit's forum, and was re-directed here; hope it's the right place.
The text was updated successfully, but these errors were encountered: