Skip to content

Add a tutorial for migrating renv projects to rig - #470

Open
gadenbuie wants to merge 1 commit into
r-lib:mainfrom
gadenbuie:docs/tutorial-migrate-renv
Open

gadenbuie wants to merge 1 commit into
r-lib:mainfrom
gadenbuie:docs/tutorial-migrate-renv

Conversation

@gadenbuie

@gadenbuie gadenbuie commented Oct 15, 2026 •

Copy link
Copy Markdown

Summary

Adds a tutorial for users considering a move from renv to rig proj, with links from the Tutorials navigation and the R projects guide.

The article serves two audiences: readers comparing the tools and readers ready to migrate a working project. It explains the separation between requirements in rproj.toml and the resolved environment in rproj.lock, then walks through backing up the project, deactivating renv, importing and reviewing dependencies, locking and syncing, and checking the result in Positron or RStudio.

The tutorial also calls out the experimental status of rig proj and the limits of the existing import: exact versions become compatible-version requirements, package-source information is not retained, and renv's startup activation is not removed.

Follow-up

Writing this tutorial motivated a proposal for rig proj renv migrate and improvements to renv import, tracked separately in #471. This PR is documentation-only.

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.40%. Comparing base (4f9694f) to head (1ec512e).
⚠️ Report is 128 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #470      +/-   ##
==========================================
+ Coverage   65.39%   65.40%   +0.01%     
==========================================
  Files          85       85              
  Lines       44914    44914              
==========================================
+ Hits        29372    29378       +6     
+ Misses      15542    15536       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gadenbuie
gadenbuie marked this pull request as ready for review October 15, 2026 15:30
@etiennebacher

Copy link
Copy Markdown

Starting a project with renv automatically scans dependencies but rig doesn't because this requires an R session. Does this mean that the best way to start using rig in a project that doesn't use renv is to first do renv::init() and then migrate to rig? Would it make sense to extend this tutorial to cover this?

Could an alternative for non-renv projects be to manually run paste("rig proj add", paste(unique(pak::scan_deps(".")$package), collapse = " ")) and run the output in the terminal?

@gaborcsardi

Copy link
Copy Markdown
Member

I'll delay this a bit until we have worked out how exactly we should handle the different types of repositories. That'll also affect how we convert renv repositories to rig repositories. Soon.

@gaborcsardi

Copy link
Copy Markdown
Member

Let's keep an eye on this while improving #471.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants