As mlr3 populates dictionaries from packages like mlr3 or mlr3pipelines when loading extensions, those objects should be removed again when unloading the extension.
An idea brought forward by Lukas is to automate this, which I think is a good idea:
https://github.com/mlr-org/mlr3proba/issues/301#issuecomment-1912164404
A simple solution would be to tag the dictionary entries with the package that added them.
Then, during the .onUnload function, we can remove all objects that were added by the package that is being unloaded.
As
mlr3
populates dictionaries from packages likemlr3
ormlr3pipelines
when loading extensions, those objects should be removed again when unloading the extension. An idea brought forward by Lukas is to automate this, which I think is a good idea: https://github.com/mlr-org/mlr3proba/issues/301#issuecomment-1912164404A simple solution would be to tag the dictionary entries with the package that added them. Then, during the
.onUnload
function, we can remove all objects that were added by the package that is being unloaded.