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

document() failing after upgrade from 1.7.0 to 1.12.0 due to NAMESPACE file #1466

Closed
RalphJO opened this issue Feb 24, 2017 · 6 comments
Closed

Comments

@RalphJO
Copy link

RalphJO commented Feb 24, 2017

Note: Also upgrading roxygen2 from 4.1.1 to 6.0.1

Hi,

I have a package for which document() was working with devtools 1.7.0 and roxygen2 4.1.1.

After upgrading to devtools 1.12.0 and roxygen2 6.0.1 it fails as follows:

If the NAMESPACE file exists prior to calling document I get

Warning: The existing 'NAMESPACE' file was not generated by roxygen2, and will not be overwritten.

with the result that build fails as my imports and exports are not set up (previously the NAMESPACE file was over-written).

However, if I delete the existing NAMESPACE file (which should be fully created by roxygen2 anyway) I get

Updating MyPackage documentation
Loading MyPackage
Re-compiling MyPackage
"c:/R-3.3.2/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD INSTALL
"C:\MyPackage"
--library="C:\Users\Ralph\AppData\Local\Temp\Rtmp4QMFIi\devtools_install_14a44c08602b"
--no-R --no-data --no-help --no-demo --no-inst --no-docs --no-exec
--no-multiarch --no-test-load --preclean

  • installing source package 'MyPackage' ...
    ERROR: a 'NAMESPACE' file is required

This error occurs in the call to install_min
from compile_dll
from load_all
from document

@BarkleyBG
Copy link

BarkleyBG commented Mar 6, 2017

I've had a similar issue with devtools 1.12 and roxygen2 6.0.1. However, I was able to get this to work with devtools 1.12 and roxygen2 4.0.1. If you rolled back to your roxygen2 4.1.1, are you able to get this to work?

EDIT:
I am also having issue nearly identical to r-lib/roxygen2#600, which may or may not be helpful to diagnosing the issue in the present issue ticket.

@hadley
Copy link
Member

hadley commented Mar 7, 2017

Just delete the contents of NAMESPACE, without deleting the complete file.

@hadley hadley closed this as completed Mar 7, 2017
@privefl
Copy link

privefl commented Mar 9, 2017

I have the same issue.
Deleting the contents of NAMESPACE didn't change the warning: Warning: The existing 'NAMESPACE' file was not generated by roxygen2, and will not be overwritten..
Command used: devtools::document(roclets=c('rd', 'collate', 'namespace')).

@jimhester
Copy link
Member

Just keep the # Generated by roxygen2: do not edit by hand line at the top then.

@RalphJO
Copy link
Author

RalphJO commented Mar 9, 2017 via email

@lock
Copy link

lock bot commented Sep 18, 2018

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/

@lock lock bot locked and limited conversation to collaborators Sep 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants