Force RStudio Connect to reinstall package from custom repository

Hi,

I am developing an internal package in my company that needs to be used in RStudio Connect. For this reason, I ended up creating a custom package repository following this link. The package repository is both available in RStudio Server and Connect and I had no issues installing it from source for the first time in my app.

The problem appeared when I tried to reinstall the same package (with exactly the same version) after a minor update on it. In RStudio the package is updated to its latest version, but when I ran the app I can see that the js assets that I modified are exactly as before. I experienced the same issue after changing R functions.

My assumption is that RStudio Connect is not reinstalling the package on deployment because it does not see any difference in the package version. Is that right? If so, is there a way to force RSC to reinstall from source the package on deployment?

Thanks!

Hi @joseluizferreira,

Your hunch is right. RStudio Connect package installs are based on the package version. The way to fix this is to increment the package version when you add new features before you reinstall in the IDE.

This is one reason people use RStudio Package Manager. It can serve the role of that custom CRAN-like repository you built, but also includes auto-building and versioning internal packages on commits or tags to a git repo.

Hope that's helpful!

Hi @alexkgold,

It is very helpful, thanks a lot!

It's in our pipeline to test out the Package Manager, so that's great to hear! Do you have any references on the Package Manager/RSC integration? I could not find in documentation after a quick read... in summary, I am curious about how it would handle authentication with our git repos on RSC.

Thanks again!

Hi @joseluizferreira! @alexkgold and I would love to give you and your group a short demo to describe how Package Manager integrates with RSC and address any other questions you have. I'll send you a direct message with my contact info to get the ball rolling!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.