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
use_rcpp() now errors if called without name and the error is pretty confusing:
Error in `use_rcpp()`:
! Open file must be a code or test file.
It's actually coming from the internal helper compute_name(). This (inherited) documented behaviour:
#' @param name Either a string giving a file name (without directory) or
#' `NULL` to take the name from the currently open file in RStudio.
doesn't make any sense for use_rcpp(), i.e. what does the currently open file have to do with it. And, as I just found, there might not even be a currently open file.
Check if this affects other functions, e.g. use_c(), that were also touched.
The text was updated successfully, but these errors were encountered:
name
needs a default value inuse_rcpp()
or we should checkname
earlier and exit early and informatively if not provided.Introduced in 3c03f5c.
use_rcpp()
now errors if called withoutname
and the error is pretty confusing:It's actually coming from the internal helper
compute_name()
. This (inherited) documented behaviour:doesn't make any sense for
use_rcpp()
, i.e. what does the currently open file have to do with it. And, as I just found, there might not even be a currently open file.Check if this affects other functions, e.g.
use_c()
, that were also touched.The text was updated successfully, but these errors were encountered: