Commit 0ee2945
#70 follow-up: surface .r-version mismatch at R session startup
The CLI's `uvr sync` already refuses to wipe-and-rebuild when the
calling R's minor differs from the project pin (since v0.2.19), but a
user who *just* opens R against the project — never running sync —
wouldn't see that warning and could be running scripts under the
wrong R for ages. B-Nilson asked for a session-startup check.
Adds a small block to the .uvr-managed `.Rprofile` snippet that:
- reads `.r-version` if present
- compares its minor to `getRversion()`'s minor
- emits a one-line `message()` on mismatch with actionable next steps
Existing projects pick up the new check on the next `uvr init` /
`uvr sync` via `refresh_uvr_block`, which rewrites the marked block
in-place without touching user-added .Rprofile content.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 79c5572 commit 0ee2945
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
130 | 151 | | |
131 | 152 | | |
132 | 153 | | |
| |||
0 commit comments