Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
# checked out on. A CRLF checkout of repositories.R broke profile marker
# matching on Windows (see src/hardcoded.rs).
src/data/repositories.R text eol=lf

# Same for the shim R package source: it is byte-hashed by
# `cargo xtask gen-rvenv-shim`, so a CRLF checkout would look like a source
# change and fail the CI drift check. The built packages are binary.
src/data/rvenv-pkg/** text eol=lf
src/data/rvenv-shim/*.tar.gz binary
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
cargo test
cargo test -p xtask
cargo xtask gen-help --check
cargo xtask gen-rvenv-shim --check

- name: Build rig
run: |
Expand Down
111 changes: 108 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"
serde_json = "1.0"
serde_yaml = "0.9"
# rproj.lock (multi-target project lockfile)
toml = "0.8"
# hash url to get target path, for macOS installers
sha2 = "0.9.8"
# expand ~ in paths, e.g. in R_LIBS env vars, env vars for RStudio
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,15 @@ fonts-asset:
help:
cargo xtask gen-help

# Rebuild the pre-built shim R packages in src/data/rvenv-shim (one per R
# version bracket) from the package source in src/data/rvenv-pkg. `rig proj
# init` seeds one of them into a project's .rvenv/lib/rig. Needs the R
# versions listed in xtask/src/rvenv_shim.rs and installs them with `rig add`
# if they are missing, so this is a maintainer-only task; CI only runs
# `cargo xtask gen-rvenv-shim --check`, which needs no R.
rvenv-shim:
cargo xtask gen-rvenv-shim

readme: README.md

# Regenerate the command-line reference (website/reference/_commands.md) from
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@

* New `rig proj tree` shows the dependency closure of a project as a tree.

* `rig run` now uses the project environment, if you call it in a project
directory: it starts `.rvenv/bin/R`, with the project's package library
and the R version the project's lock file names, and it syncs the project
first if the environment is missing or out of date. Use `--no-project`
(or `--r-version`) to run the default R version instead.

* `rig library add`, `rig library default`, `rig library list` and
`rig library rm` have a new `--r-version` (`-r`) option, to operate on
the libraries of an R version other than the default one.
Expand Down
Loading