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

allow re-registration of same model information #653

Closed
topepo opened this issue Feb 9, 2022 · 2 comments · Fixed by #664
Closed

allow re-registration of same model information #653

topepo opened this issue Feb 9, 2022 · 2 comments · Fixed by #664
Labels
feature a feature request or enhancement

Comments

@topepo
Copy link
Member

topepo commented Feb 9, 2022

To avoid issues running devtools::test() and/or load_all().

The idea is to allow extension packages to (silently) overwrite the model registry environments if the same data is being registered.

If other data is trying to overwrite, we should issue and error saying

  • If you are working on a different extension package, we don't allow this
  • Otherwise, do a hard restart of the R session (i.e. don't load_all())
@topepo topepo added the feature a feature request or enhancement label Feb 9, 2022
@hfrick
Copy link
Member

hfrick commented Feb 9, 2022

material for context:

no onUnload() hooks called in load_all():
https://github.com/r-lib/pkgload/blob/e43073ca71fd9e2c3a759f472568518e8801353d/R/load.r#L62-L66

because it can cause crashes for packages using compiled code: r-lib/pkgload#148 (comment)

PR introducing this behaviour: r-lib/pkgload#133

topepo added a commit that referenced this issue Feb 20, 2022
topepo added a commit that referenced this issue Feb 23, 2022
* changes for #653

* minor refactoring

* unused variable

* update news

* unit tests

* ugly solution for comparing model info within list columns

* Apply suggestions from code review

Co-authored-by: Davis Vaughan <davis@rstudio.com>
Co-authored-by: Hannah Frick <hfrick@users.noreply.github.com>

* simplified testing of model info

Co-authored-by: Davis Vaughan <davis@rstudio.com>
Co-authored-by: Hannah Frick <hfrick@users.noreply.github.com>
@github-actions
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants