You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' Title#' @exporta<-function() {
print("I am a")
}
dbg/b.R
box::use(dbg/a)
#' Title#' @exportb<-function() {
print("I am b and call a")
a$a()
}
dbg/c.R
box::use(dbg/a)
box::use(dbg/b)
#' Title#' @exportc<-function() {
print("I am c and call a and b")
a$a()
b$b()
}
When trying to reload module c you get the following error:
box::use(dbg/c)
box::reload(c)
# Warning message:# In rm(list = info$source_path, envir = loaded_mods) :# object '<path stripped>\\dbg\\a.R' not found
Issue lies within box:::deregister_mod where we try to remove the module. Because it is loaded twice (once via dbg/b and once via dbg/c) the second attempt to delete it will eventually raise the warning, which I consider spurious.
Easy fix would be to muffle it or to include some chekc to see whether the module is still in loaded_mods.
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.2.0
The text was updated successfully, but these errors were encountered:
Fixes#363.
Squashed commit of the following:
commit 9e02d8840f6b832e8bf9a870cc8787fe44925c88
Author: Konrad Rudolph <[email protected]>
Date: Sat Jun 29 18:51:36 2024 +0200
Check before dereginstering a module
A module may have already been deregistered if it was loaded by two
modules which are both loaded by the module being unloaded by the user.
commit b7a464c9024e58e42e44ac5cd6ba5c76db248e80
Author: Konrad Rudolph <[email protected]>
Date: Sun Jun 30 23:13:42 2024 +0200
Add failing unit test
commit ccf9a10
Author: Konrad Rudolph <[email protected]>
Date: Sun Jun 30 23:31:49 2024 +0200
Set dev version number
commit b88b59b069b63a2facdbbaf7f364afa5b2063858
Author: Konrad Rudolph <[email protected]>
Date: Sun Jun 30 23:43:17 2024 +0200
Document changes
radbasa
pushed a commit
to Appsilon/box
that referenced
this issue
Jul 1, 2024
Fixesklmr#363.
Squashed commit of the following:
commit 9e02d8840f6b832e8bf9a870cc8787fe44925c88
Author: Konrad Rudolph <[email protected]>
Date: Sat Jun 29 18:51:36 2024 +0200
Check before dereginstering a module
A module may have already been deregistered if it was loaded by two
modules which are both loaded by the module being unloaded by the user.
commit b7a464c9024e58e42e44ac5cd6ba5c76db248e80
Author: Konrad Rudolph <[email protected]>
Date: Sun Jun 30 23:13:42 2024 +0200
Add failing unit test
commit ccf9a10
Author: Konrad Rudolph <[email protected]>
Date: Sun Jun 30 23:31:49 2024 +0200
Set dev version number
commit b88b59b069b63a2facdbbaf7f364afa5b2063858
Author: Konrad Rudolph <[email protected]>
Date: Sun Jun 30 23:43:17 2024 +0200
Document changes
Error description
Assume the following modules:
dbg/a.R
dbg/b.R
dbg/c.R
When trying to
reload
modulec
you get the following error:Issue lies within
box:::deregister_mod
where we try to remove the module. Because it is loaded twice (once viadbg/b
and once viadbg/c
) the second attempt to delete it will eventually raise the warning, which I consider spurious.Easy fix would be to muffle it or to include some chekc to see whether the module is still in
loaded_mods
.R version
‘box’ version
1.2.0
The text was updated successfully, but these errors were encountered: