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

box::export() at namespace scope overrides export attribute declarations #375

Open
klmr opened this issue Nov 12, 2024 · 0 comments
Open

Comments

@klmr
Copy link
Owner

klmr commented Nov 12, 2024

Error description

MWE

mwe.r

#' @export
test1 = 1

test2 = 2

box::export(test2)
box::use(./mwe)
ls(mwe)

Expected result

[1] "test1" "test2"

Actual result

[1] "test2"

Additional details

Calling box::export() in .on_load() works as expected; i.e. when changing mwe.r to the following, we get the expected result:

#' @export
test1 = 1

test2 = 2

.on_load = function (ns) {
  box::export(test2)
}

R version

_                           
platform       aarch64-apple-darwin20      
arch           aarch64                     
os             darwin20                    
system         aarch64, darwin20           
status                                     
major          4                           
minor          3.1                         
year           2023                        
month          06                          
day            16                          
svn rev        84548                       
language       R                           
version.string R version 4.3.1 (2023-06-16)
nickname       Beagle Scouts

‘box’ version

1.1.3

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