Skip to content

document() recompiles package source code, which requires a NAMESPACE #1016

Closed
@cboettig

Description

@cboettig

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

# Generated by roxygen2: do not edit by hand

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions