Replies: 1 comment
-
I spent some more time looking through the documentation and as long as the respective module has an export it seems I can leverage the
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed that registering external S3 methods in a module will keep that method available, even if the module that registered it is removed with
box::unload()
take the example in mod/a.r:
and another mod mod/b.r
Then if you were to use these modules
With this you can see that the
b
module is still in the environment, specifically bound to the.__S3MethodsTable__.
of the a module, as as such it can still be changed if the user is determined enough.As the intention behind box is to have self contained modules, it may be surprising to users to find certain S3 methods are maintained (and by proxy, the module environment isn't fully unloaded) after a
box::unload()
is called.So this leads me to my question of if external S3 methods should be removed from the
.__S3MehtodsTable__.
of where ever they are registered once the module itself is unloaded?I think this requires some thought. I personally do not know all the hedge cases. I imagine there could be a case where there could be a
mod/c.r
that relies on thefoo.default
method to exist and would suddenly break ifmod/b.r
's method were to fully unregister.Beta Was this translation helpful? Give feedback.
All reactions