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

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

Open
thothal opened this issue May 2, 2024 · 0 comments
Open

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

thothal opened this issue May 2, 2024 · 0 comments

Comments

@thothal
Copy link

thothal commented May 2, 2024

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’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant