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

renv::upgrade() should restart? #1579

Closed
hadley opened this issue Jul 24, 2023 · 3 comments
Closed

renv::upgrade() should restart? #1579

hadley opened this issue Jul 24, 2023 · 3 comments

Comments

@hadley
Copy link
Member

hadley commented Jul 24, 2023

I just upgraded a project that was using 0.17 and saw:

> renv::upgrade()
A new version of the renv package will be installed:

# RSPM ===============================
- renv   [0.17.3 -> 1.0.0]

This project will use the newly-installed version of renv.

Do you want to proceed? [y/N]: y
Retrieving 'https://packagemanager.rstudio.com/all/latest/src/contrib/renv_1.0.0.tar.gz' ...
	OK [downloaded 1.2 Mb in 0.75 seconds]
Installing renv [1.0.0] ...
	OK [built from source in 5 seconds]
Moving renv [1.0.0] into the cache ...
	OK [moved to cache in 1.1 milliseconds]
Warning message:
In eval(handler$expr, handler$envir) : internal error -3 in R_decompress1
warning messages from top-level task callback 'renv_sandbox_task'
Warning messages:
1: In callback() : internal error -3 in R_decompress1
2: renv background task 'renv_sandbox_task' failed; it will be stopped 
warning messages from top-level task callback 'renv_snapshot_task'
Warning messages:
1: In callback() : internal error -3 in R_decompress1
2: renv background task 'renv_snapshot_task' failed; it will be stopped 

That makes me think that restart R rather trying to reload the package.

But it's also a little suspicious that we get the warning even though renv_upgrade_reload() attempts to remove all the callbacks.

@kevinushey
Copy link
Collaborator

Do you also see these errors if you upgrade from 1.0.0 to the latest GitHub release? It's possible the issue is that renv 0.17.3 isn't properly unloading the task callbacks.

@kevinushey kevinushey added this to the 1.0.1 milestone Jul 24, 2023
@hadley
Copy link
Member Author

hadley commented Jul 24, 2023

Oh good point. I'll double check.

@hadley
Copy link
Member Author

hadley commented Jul 25, 2023

Yeah, looks like this was a bug in 0.17.3

A new version of the renv package will be installed:

# GitHub ---------------------------------------------------------------------
- renv   [1.0.0 -> rstudio/renv@main]

This project will use the newly-installed version of renv.

Do you want to proceed? [Y/n]: 
# Downloading packages -------------------------------------------------------

- Downloading renv from GitHub ...              OK [973.7 Kb in 0.83s]

# Installing packages --------------------------------------------------------

- Installing renv ...                           OK [built from source and cached in 5.5s]

- Lockfile written to '~/Desktop/renv-upgrade/renv.lock'.

I did get this error when I restarted R, but I think that's fixed in main:

Error in (function (envir)  : 
  lazy-load database '/Users/hadleywickham/Desktop/renv-upgrade/renv/library/R-4.2/aarch64-apple-darwin20/renv/R/renv.rdb' is corrupt
In addition: Warning message:
In (function (envir)  : internal error -3 in R_decompress1

@hadley hadley closed this as completed Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants