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

Use DESCRIPTION instead of dependencies.R #205

Open
kamilzyla opened this issue Apr 6, 2022 · 1 comment · May be fixed by #230
Open

Use DESCRIPTION instead of dependencies.R #205

kamilzyla opened this issue Apr 6, 2022 · 1 comment · May be fixed by #230
Labels
status: research Exploration needed to clarify goal or find solutions type: feature Major new functionality

Comments

@kamilzyla
Copy link
Collaborator

kamilzyla commented Apr 6, 2022

Currently we use implicit renv snapshots with dependencies.R + .renvignore to achieve a similar effect to explicit snapshots with a DESCRIPTION file. Explicit snapshots would be a more natural and preferable approach, but the seemed not to work in deployment to RSConnect when box was used. It might possible to use them after all - see research below.

Research by Jakub

Initial tests: both renv and packrat read it out of the box.

renv works with a DESCRIPTIOPN file that includes only Imports section. packrat requires also Package.

Need to be tested with RSConnect Deployment.

Note: DESCRIPTION can be manipulated using desc package.

@kamilzyla kamilzyla self-assigned this Apr 7, 2022
@kamilzyla kamilzyla linked a pull request Apr 11, 2022 that will close this issue
@kamilzyla
Copy link
Collaborator Author

kamilzyla commented Apr 20, 2022

The PR #230 offers a complete implementation for this feature, but we decided to postpone it as the solution has some side effects which need to be considered. A project with a DESCRIPTION containing Package: line is treated as an R package by renv. It then puts the library outside the project which can cause issues when trying to run rhino::init() for the second time in the same directory. It might also break CI caching (fixable) and seems less desirable in general (libraries left behind after a project, how do I purge a library).

Possible solutions:

  1. Keep the library in the project with RENV_PATHS_LIBRARY.
  2. Remove the library before init().
  3. Pick the “2. Re-initialize” option during init().
  4. Initialize bare.

@kamilzyla kamilzyla removed their assignment Apr 22, 2022
@kamilzyla kamilzyla added type: feature Major new functionality status: research Exploration needed to clarify goal or find solutions labels Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: research Exploration needed to clarify goal or find solutions type: feature Major new functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant