Mac Update Packages misfire


#1

When I update packages (from the IDE), if I end up updating packages that are in use, it prompts me asking if I want to restart R. I say “yes” and it restarts, and… and… it doesn’t work.

The Mac version of the IDE has worked this way for a long time and it’s an annoying bug. I believe that the problem is that it (evidently only the Mac version) will automatically load libraries that are necessary for variables in the environment, so after the restart some libraries are automatically reloaded. My manual workaround is to first clear the environment, then restart R, then update packages. Works every time, but I wish it would be fixed.

At a minimum, the easy fix is to warn the user that the environment will be cleared and prompt if they want to: a) cancel, b) continue without saving, or c) save the environment and continue. Then do that.


#2

Yes, I also experience this issue! It’s been around so long that I kind of ignore it now. I had come to believe that I was somehow doing something wrong.


#3

We actually considered doing this:

https://github.com/rstudio/rstudio/pull/866

but were worried about the ramifications of users unexpectedly losing data in their global environment when restarting the R session. However, we can consider other solutions (e.g. install the package and then restore the environment) but this was unfortunately out of scope for the v1.1 release.

We’ll see if we can revisit this in the future. Thanks for reporting!