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

roxygen 5.0.0 does not recognize its tags anymore #422

Closed
Starfox899 opened this issue Nov 2, 2015 · 12 comments
Closed

roxygen 5.0.0 does not recognize its tags anymore #422

Starfox899 opened this issue Nov 2, 2015 · 12 comments

Comments

@Starfox899
Copy link

Dear all,

after having upgraded to roxygen2 5.0.0 I am recognizing strange behavior. Inparticular roxygen tells me any tag is unknown. As a result NAMESPACE and others are all empty. Any ideas why this is happening?

Example:

> devtools::document()
Updating rpnfext documentation
Loading rpnfext
Writing NAMESPACE
There were 28 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: @title [foo.R#1]: unknown tag
2: @description [foo.R#1]: unknown tag
3: @export [foo.R#4]: unknown tag
4: @title [foo.R#1]: unknown tag
5: @description [foo.R#1]: unknown tag
6: @export [foo.R#25]: unknown tag
7: @title [foo.R#1]: unknown tag
8: @description [foo.R#1]: unknown tag
9: @export [foo.R#45]: unknown tag
10: @title [getSymbolsForIndexSymbols.R#2]: unknown tag
11: @param [getSymbolsForIndexSymbols.R#4]: unknown tag
12: @param [getSymbolsForIndexSymbols.R#5]: unknown tag
13: @return [getSymbolsForIndexSymbols.R#7]: unknown tag
14: @import [getSymbolsForIndexSymbols.R#8]: unknown tag
15: @import [getSymbolsForIndexSymbols.R#9]: unknown tag
16: @export [getSymbolsForIndexSymbols.R#10]: unknown tag
17: @title [processor-wrappers.R#1]: unknown tag
18: @description [processor-wrappers.R#1]: unknown tag
19: @param [processor-wrappers.R#8]: unknown tag
20: @param [processor-wrappers.R#9]: unknown tag
21: @param [processor-wrappers.R#10]: unknown tag
22: @inheritParams [processor-wrappers.R#11]: unknown tag
23: @return [processor-wrappers.R#12]: unknown tag
24: @export [processor-wrappers.R#13]: unknown tag
25: @seealso [processor-wrappers.R#14]: unknown tag
26: @references [processor-wrappers.R#15]: unknown tag
27: @import [processor-wrappers.R#16]: unknown tag
28: @examples [processor-wrappers.R#17]: unknown tag
@emhart
Copy link

emhart commented Nov 2, 2015

I'm having a similar issue see this gist for session info. I created a test directory that had the single fxn str_length() pulled from the read me and created a dummy package directory structure. Everything works fine with 4.1.1 when I install the OSX binary on CRAN but when I instally v. 5.0.0 from source I get the same error as above and on my gist.

@hadley
Copy link
Member

hadley commented Nov 2, 2015

Could you please both provide devtools::session_info() and ls(roxygen2:::tags)? I'm not sure what's different on your systems compared to everyone else.

@emhart
Copy link

emhart commented Nov 2, 2015

>  devtools::session_info()
Session info ------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.1.3 (2015-03-09)
 system   x86_64, darwin13.4.0        
 ui       RStudio (0.99.667)          
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/Los_Angeles         

> Packages ----------------------------------------------------------------------------------------
 package    * version date       source        
 colorspace * 1.2-6   2015-03-11 CRAN (R 3.1.3)
 devtools     1.7.0   2015-01-17 CRAN (R 3.1.2)
 digest     * 0.6.8   2014-12-31 CRAN (R 3.1.2)
 ggplot2      1.0.1   2015-03-17 CRAN (R 3.1.3)
 gtable     * 0.1.2   2012-12-05 CRAN (R 3.1.0)
 httr         1.0.0   2015-06-25 CRAN (R 3.1.3)
 lattice    * 0.20-31 2015-03-30 CRAN (R 3.1.3)
 magrittr   * 1.5     2014-11-22 CRAN (R 3.1.2)
 MASS       * 7.3-40  2015-03-21 CRAN (R 3.1.3)
 memoise    * 0.2.1   2014-04-22 CRAN (R 3.1.0)
 munsell    * 0.4.2   2013-07-11 CRAN (R 3.1.0)
 plyr       * 1.8.2   2015-04-21 CRAN (R 3.1.3)
 proto      * 0.3-10  2012-12-22 CRAN (R 3.1.0)
 R6         * 2.0.1   2014-10-29 CRAN (R 3.1.2)
 raster       2.3-40  2015-04-11 CRAN (R 3.1.3)
 Rcpp       * 0.11.6  2015-05-01 CRAN (R 3.1.3)
 reshape2   * 1.4.1   2014-12-06 CRAN (R 3.1.2)
 roxygen2     5.0.0   2015-10-28 CRAN (R 3.1.3)
 rstudioapi * 0.3.1   2015-04-07 CRAN (R 3.1.3)
 scales     * 0.3.0   2015-08-25 CRAN (R 3.1.3)
 sp           1.1-0   2015-04-24 CRAN (R 3.1.3)
 stringi    * 0.4-1   2014-12-14 CRAN (R 3.1.2)
 stringr    * 1.0.0   2015-04-30 CRAN (R 3.1.3)


> ls(roxygen2:::tags)
 [1] "aliases"           "author"            "backref"           "concept"          
 [5] "describeIn"        "description"       "details"           "docType"          
 [9] "encoding"          "evalRd"            "example"           "examples"         
[13] "export"            "exportClass"       "exportMethod"      "exportPattern"    
[17] "family"            "field"             "format"            "import"           
[21] "importClassesFrom" "importFrom"        "importMethodsFrom" "include"          
[25] "inheritParams"     "keywords"          "method"            "name"             
[29] "noRd"              "note"              "param"             "rawNamespace"     
[33] "rawRd"             "rdname"            "references"        "return"           
[37] "S3method"          "section"           "seealso"           "slot"             
[41] "source"            "template"          "templateVar"       "title"            
[45] "usage"             "useDynLib"        

hadley added a commit that referenced this issue Nov 2, 2015
@hadley
Copy link
Member

hadley commented Nov 2, 2015

@emhart can you try now? I just spotted a really dumb error so I think it might be ok for you now

@hadley
Copy link
Member

hadley commented Nov 2, 2015

Nope, I just don't understand operator precedence.

@hadley
Copy link
Member

hadley commented Nov 2, 2015

Any chance you have an object called tags in your global environment or package?

@kevinushey
Copy link
Contributor

I know what's going on (and I was just bitten by this in packrat as well!)

You're using names(tags) to try and get items within an environment, but the names method only exists for environments with R >= 3.2. You need to use ls(tags) instead.

@hadley hadley closed this as completed in 5c054aa Nov 3, 2015
hadley added a commit that referenced this issue Nov 3, 2015
use 'ls()' instead of 'names()' (closes #422)
@Starfox899
Copy link
Author

I can confirm this fixed the bug. I checked latest git version, and now it works fine.
Thanks a lot!

@fisher
Copy link

fisher commented Nov 5, 2015

And when the fix will be available through install.package() ?

@christophergandrud
Copy link

I just upgraded to version 6.0.0 and am now getting a similar series of warnings for a package's reference class documentation, e.g.:

Updating Zelig documentation
Loading Zelig
Warning: @import [model-zelig.R#6]: unknown tag
Warning: @export [model-zelig.R#7]: unknown tag
Warning: @exportClass [model-zelig.R#8]: unknown tag
Warning: @import [model-timeseries.R#4]: unknown tag
Warning: @export [model-timeseries.R#5]: unknown tag
Warning: @exportClass [model-timeseries.R#6]: unknown tag
Warning: @export [model-timeseries.R#150]: unknown tag
Warning: @import [model-ma.R#5]: unknown tag
Warning: @export [model-ma.R#6]: unknown tag
Warning: @exportClass [model-ma.R#7]: unknown tag
Warning: @import [model-ar.R#5]: unknown tag
Warning: @export [model-ar.R#6]: unknown tag
Warning: @exportClass [model-ar.R#7]: unknown tag

and so on.

Any idea what's going on. (I'ld be happy to provide sessionInfo, etc if that would help.)

@hadley
Copy link
Member

hadley commented Jan 31, 2017

@christophergandrud can you please file a new issue with a minimal reprex?

@christophergandrud
Copy link

christophergandrud commented Jan 31, 2017

Sure. New issue at: #571

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

6 participants