Skip to content

Check name early in use_rcpp() and use_c() - #2283

Open
taekop wants to merge 1 commit into
r-lib:mainfrom
taekop:fix-use-rcpp-name
Open

taekop wants to merge 1 commit into
r-lib:mainfrom
taekop:fix-use-rcpp-name

Conversation

@taekop

@taekop taekop commented Oct 1, 2026

Copy link
Copy Markdown

use_rcpp() (and so use_rcpp_armadillo() / use_rcpp_eigen()) and use_c() only resolved name after they had already edited DESCRIPTION, appended roxygen tags and created src/. So a call without name (or with an invalid one, e.g. use_rcpp("a.c")) errored but still left those changes behind.

name is now resolved up front, before anything is modified. Error messages and successful calls are unchanged.

The new test fails on main (src/ exists and DESCRIPTION has changed after the failed calls) and passes with this change.

Closes #1953

@taekop
taekop force-pushed the fix-use-rcpp-name branch from 9b01e31 to 09323fd Compare October 20, 2026 10:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

name needs a default value in use_rcpp() ...

1 participant