Lockfile package version view in RStudio after renv reproducible environment implementation

Hi, I've recently implemented the {renv} package on an existing RStudio Project using renv::init()

I can push the renv.lock file to GitHub and view its contents and I can see the lock file contents in the Terminal using 'cat renv.lock', however the package version details do not show up in the Lockfile column in the Rstudio 'Packages' panel :slightly_frowning_face:

image

Incidentally when I click on the renv.lock file in 'Files' panel I get this message:

'File is binary rather than text so cannot be opened by the source editor'

Is this anything to do with this issue?

I'm on Windows 10 Enterprise, x64-based processor and Posit Workbench (R version 4.1.2)

Thanks :+1:

Hi @allanjames1506,

I've encountered this 'File is binary rather than text so cannot be opened by the source editor' issue before, and it might be behind why the package version details aren't showing up in the viewer pane.

There's a Linux utility called file which is used to recognize file types. It sounds like this is missing on your Workbench installation. To resolve this, I'd request that your administrator install this utility with sudo apt-get install file (Ubuntu) or sudo yum install file (RHEL) on the Workbench server. This will resolve the issue for all users.

Let us know if this addresses the issue.

Thanks,
Katie

Hi @katie - many thanks for this, I've passed on the details to our IT admin.

Just to follow up, it was suggested that I post a GitHub repo that demonstrates this behaviour i.e. Lockfile packages not showing up in the RStudio Packages pane

Here is one of my own GitHub repos (my original question related to my job/work) and is slightly different - here I find that I can view the renv.lock file (i.e. I don't get the 'File is binary....' message) but packages still don't show up in the Lockfile column in RStudio

allanjames1506/plant-clock-meta: meta analysis of plant clock ChIP studies (github.com)

Would it be interesting to see if you were able to see the Lockfile packages in my repo?

This time I'm on RStudio (2023.03.0+386) on macOS 12.3.1

Thanks
Allan

Hi @allanjames1506 , have you figured out a solution?
I'm also not seing the lockfile package versions in the Rstudio packages panel for one of my projects (other projects work fine). Although i have no problem opening the lockfile itself.
(I'm on 2023.03.1 Build 446 for widnows 10).

Hi @maja
I think my question split into 2 issues

The fist one was not seeing the renv.lock file which I think is a more local systems-admin type issue with where I work and is now resolved internally

The second issue I think is more global and is where the package versions are not showing up in the Lockfile column. I recently got an encouraging reply from Posit via e-mail for a potential resolution to this, but I guess we would need to wait for the next release of RStudio:

'what you are seeing in RStudio is a true bug. Our developers have a fix in both renv + RStudio, and it should be resolved in the next release. If you need an immediate fix, you can always use the dev version of renv in the meantime: renv::install("rstudio/renv")'

Hope this helps!

Allan

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.