Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use_namespace(roxygen=FALSE) creates an invalid NAMESPACE #1120

Closed
mtmorgan opened this issue Apr 29, 2020 · 0 comments
Closed

use_namespace(roxygen=FALSE) creates an invalid NAMESPACE #1120

mtmorgan opened this issue Apr 29, 2020 · 0 comments

Comments

@mtmorgan
Copy link

mtmorgan commented Apr 29, 2020

usethis::create_package("foo", roxygen = FALSE)
devtools::install()

fails with

** building package indices
Error : '\.' is an unrecognized escape in character string starting ""^[^\."
ERROR: installing namespace metadata failed

because

write_over(path, 'exportPattern("^[^\\.]")')
creates a namespace with text

$ cat NAMESPACE
exportPattern("^[^\.]")

The escaped . needs to be \\\\.

jennybc added a commit that referenced this issue Apr 29, 2020
Fixes #1120

Prior to c8d7038, this string appeared in a template file. Since we now use `write_over()`, we must escape '\\'.
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

No branches or pull requests

1 participant