Closed juliasilge closed 2 years ago
I am currently thinking that we should encourage users to manage package versions with renv or to use vetiver (which will handle this for users). I think that utils::packageVersion()
is not really good enough but putting renv handling here seems out of scope to me.
What do you think @simonpcouch?
I agree with your thinking!
What are your thoughts on whether including utils::packageVersion()
checking is still worth it, given that it's not good enough? I'm 50/50βit's additional complexity/scope to maintain, but also seems like it may indeed help troubleshooting more obvious environment issues.
I currently lean toward taking it out, because I think it's not thorough enough for most use cases. For example, for a tidymodels workflow, we don't only need to keep track of the version of workflows: https://github.com/rstudio/bundle/blob/56c49e493c3604246cade523782f7237133c0847/R/bundle_workflows.R#L67 But we also need to keep track of all the packages wrapped up in the workflow.
This functionality is already in vetiver and my inclination is that it would be unwise to duplicate that functionality.
I do think we should mention this in documentation somewhere and say basically: "sometimes software changes -- to check you are using the same versions when predicting as when you trained, use vetiver or renv".
Is that convincing to you? π Do you have an opinion on where best to put that documentation?
I hear you! I think getting rid of the package versioning is a solid move, and a short bit of documentation on how to ensure one is using the right versions is a good idea! This could maybe live near the end of the return_bundle
template?
https://github.com/rstudio/bundle/blob/5d3c021/man-roxygen/return_bundle.R#L28
Yeah, that sounds great to me. π
As of today, using
bundle()
stores the package version viautils::packageVersion()
. This does get us some versioning information but is not up to the level of renv.utils::packageVersion()
good enough or should we go to renv?