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-r-dependencies with working-directory fails when renv is present #768

Closed
milanmlft opened this issue Oct 18, 2023 · 3 comments · Fixed by #770
Closed

setup-r-dependencies with working-directory fails when renv is present #768

milanmlft opened this issue Oct 18, 2023 · 3 comments · Fixed by #770
Labels
bug an unexpected problem or unintended behavior

Comments

@milanmlft
Copy link
Contributor

Describe the bug
Context: GitHub repo with an R package in a subdirectory with an associated renv environment, example: https://github.com/milanmlft/test-r-lib-actions
When setting working-directory for setup-r-dependencies@v2 to run the GHA workflow in the package subdirectory, I get the error

 Error: 
  ! error in pak subprocess
  Caused by error in `loadNamespace(name)`:
  ! there is no package called ‘pak’

during Dependency resolution.

I think this is happening because pak gets installed before the renv environment in the subdirectory gets activated. Hence pak is not present in the renv library and so is not found.

To Reproduce
Full logs: https://github.com/milanmlft/test-r-lib-actions/actions/runs/6562363561/job/17824139556

Expected behavior
pak should be installed in the renv library of the subdirectory.

@milanmlft milanmlft added the bug an unexpected problem or unintended behavior label Oct 18, 2023
@milanmlft milanmlft changed the title setup-r-depencies with working-directory fails when renv is present setup-r-dependencies with working-directory fails when renv is present Oct 18, 2023
@gaborcsardi
Copy link
Member

setup-dependencies is not designed to work with renv, maybe you'll have better luck with setup-renv?

@milanmlft
Copy link
Contributor Author

Yes, but then I have the problem that setup-renv doesn't support working-directory :( as in #618

Copy link

github-actions bot commented Nov 3, 2023

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants