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

Reexports don't work with trailing comma #263

Closed
kamilzyla opened this issue Jan 20, 2022 · 1 comment
Closed

Reexports don't work with trailing comma #263

kamilzyla opened this issue Jan 20, 2022 · 1 comment

Comments

@kamilzyla
Copy link
Contributor

Error description

Say we have main.R with the following content:

#' @export
box::use(
  ./module,
)

Trying to box::use(./main) results in the following error:

Error in box::use(./main) : 
  alias without name provided in use declaration
(inside “parse_pkg_name(expr)”)

Removing the trailing comma after ./module makes the code work as expected. As trailing commas normally work inside box::use(), I'd expect them to work when #' @export is applied as well.

R version

platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          4                           
minor          1.1                         
year           2021                        
month          08                          
day            10                          
svn rev        80725                       
language       R                           
version.string R version 4.1.1 (2021-08-10)
nickname       Kick Things

‘box’ version

1.1.0

@klmr
Copy link
Owner

klmr commented Jan 20, 2022

Thanks for reporting! A fix has been committed and will be part of the next release. To use the fixed version before it arrives on CRAN (which potentially won’t be for a while!), please install the dev version via

install.packages('box', repos = 'https://klmr.r-universe.dev')

Please note that it may take up to an hour before the fix will land in the dev build.

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

2 participants