Skip to content

A Whitespace Character After #' @export Prevents Export #362

@thothal

Description

@thothal

Error description

Reprex

Consider the following module:

#' Title
#' @export 
a <- function() {
}


#' Title
#' @export
b <- function() {
}

Please note the white-space character after #' @export . This prevents the function from being exported.

Since this is really a nasty behavior (and very difficult to debug), we should at least mention that in the docs, since I guess this has nothing to do with box itself but roots from some underlying roxygen2 parsing.

R Packages

When you use RStudio for authoring a package and would include a white-space after #' @export it gets automatically deleted upon saving the file. Hence, I believe that it would also be an issue there, but is nicely prevented by the IDE. Since RStudio does not show the same benevolence for box roxygen comments, we should mention that in the docs, as a white-space can easily slip in.

R version

_                                
platform       x86_64-w64-mingw32               
arch           x86_64                           
os             mingw32                          
crt            ucrt                             
system         x86_64, mingw32                  
status                                          
major          4                                
minor          2.2                              
year           2022                             
month          10                               
day            31                               
svn rev        83211                            
language       R                                
version.string R version 4.2.2 (2022-10-31 ucrt)
nickname       Innocent and Trusting

‘box’ version

[1] ‘1.2.0’

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions