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

setup-deps fails for packages with renv on Fedora containers #596

Open
ezraporter opened this issue Apr 11, 2024 · 6 comments
Open

setup-deps fails for packages with renv on Fedora containers #596

ezraporter opened this issue Apr 11, 2024 · 6 comments
Labels
feature a feature request or enhancement

Comments

@ezraporter
Copy link

When running rhub_check() for Fedora platforms, the setup-deps step fails for me when trying to locate pak:

https://github.com/CHOP-CGTInformatics/REDCapTidieR/actions/runs/8649035798

Rhub v2 is working great for all other platforms. I tested at least one other linux container (clang-asan) so this doesn't appear general to all linux containers vs. other platforms.

I suspect the issue is with renv causing pak to be installed in a place that library(pak, lib.loc = Sys.getenv("R_LIB_FOR_PAK")) can't detect.

I'm using rhub_2.0.0 from CRAN.

@gaborcsardi
Copy link
Collaborator

I am surprised that renv projects work at all, TBH. I am a bit unsure what we should do with renv projects, because there is a tension between using the package versions from the renv.lock file, and running R CMD check, which for many checks assumes that the packages are latest ones from CRAN.

I assume you'd want to install the package versions from the renv.lock file?

@ezraporter
Copy link
Author

ezraporter commented Apr 11, 2024

I assume you'd want to install the package versions from the renv.lock file?

Actually the opposite. We use rhub for running checks on multiple platforms before submitting to CRAN. We want to test against all the latest CRAN versions of dependencies as CRAN would. For our purposes it would be good enough to have an option that deactivates renv before running any checks.

For context, we use renv with package projects so developers can all have a consistent dev environment. In CI and pre-release checks though we want to test against the latest versions of everything since users don't care what our dev environment looks like.

@gaborcsardi
Copy link
Collaborator

That makes sense and it should not be too hard to implement.

@gaborcsardi gaborcsardi added the feature a feature request or enhancement label Apr 11, 2024
@ezraporter
Copy link
Author

Great! Thanks so much!

@gaborcsardi
Copy link
Collaborator

So, it seems that all renv::deactivate() does is deleting the .Rprofile file? Which is great, because then we can just delete that, and don't need to install renv to call renv::deactivate().

@ezraporter
Copy link
Author

That sounds basically right although renv::deactivate() looks to possibly be doing a bit more to avoid disrupting an existing .Rprofile. You wouldn't have any complaints from me if you implemented by just deleting the .Rprofile though.

Understandable if you didn't want to rely on this but renv's default behavior is to try to install itself when R starts if it isn't installed already so you could run renv::deactivate() and not have to worry about installing it as a separated step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants