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
Remove non-API usage of R_NamespaceRegistry (#488)
* Don't rely on transitive include of `"fmt/core.h"`
We got it through `cpp11/protect.hpp`, but we should not rely on that
* Correctly use `fmt::runtime()` on runtime strings passed to `fmt::format()`
In fmt, there is a `FMT_CONSTEVAL` macro that resolves to `consteval` on "new enough" C++ (otherwise it doesn't do anything). For R 4.6+, the default C++ used is finally "new enough" (`__cplusplus > 201703L`).
This causes all `fmt::format()` calls to require a constant expression for `const char*` and `std::string&` input, which we are not currently doing via `fmt_arg`.
We have a runtime provided string, which must now be wrapped in `fmt::runtime()`, which is what we should have been doing all along.
* Add `r_ns_env()` and use in `get_namespace()`
Throwing an informative (and tested!) error when we can't find the package namespace
* Define `RCPP_NO_R_HEADERS_CHECK` before all `#include <Rcpp.h>` usage
`#include <cpp11/R.hpp>` sets everything up the right way, and otherwise we get a warning from Rcpp which doesn't seem to end up being relevant for this use case
* Use `r_env_has()` + `r_env_get()`
To avoid triggering a NOTE about usage of `Rf_findVarInFrame3()` on R 4.5, where technically we had the tools to avoid that
0 commit comments