-
Notifications
You must be signed in to change notification settings - Fork 761
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
document() recompiles package source code, which requires a NAMESPACE #1016
Comments
Roxygen is a run-time documentation system - it inspects the objects in the package environment, not just the source code. That means it needs to Would you mind briefly outlining a series of steps that gets you to this point? Normally the NAMESPACE doesn't matter when compiling code. |
Apologies for not having a good minimal example, this could be user error from a naive attempt to wrap a C program. Anyway, if you clone https://github.com/cboettig/rappl/tree/testing and run Here's the run log I see:
This seems to be related to the fact that I am using the Makefile from the original C program, which I understand isn't the right thing to do, so perhaps this isn't a problem once I figure out how to write the proper Makevars file in place of it, so perhaps this isn't a real issue. (I have a deal to learn still on that front). I was just surprised by the error. |
How did you create the original package? Most ways should give you a dummy/empty NAMESPACE. |
I created it with |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Attempting to write a package wrapper around some existing source code. For reasons that are not obvious to me, calling devtools::document() starts the package recompiling. Moreover, this call fails if the package does not have a NAMESPACE file. If I start the package with a manually created NAMESPACE (even a blank one), then devtools::document() runs, recompiling everything, but then refuses to update my NAMESPACE file. Thus it appears impossible to have devtools create a NAMESPACE for the package.
Of course I can hack around this by starting with a NAMESPACE file with the comment
but this feels wrong. Is there a more elegant work-around out of this catch-22? (Why does document() need to recompile anyhow?) Am I missing something?
The text was updated successfully, but these errors were encountered: