Debian Codegraph @

tests/testthat/_snaps/snapshot.md

raw symbols SCIP
1 # snapshot failures are reported
2
3 Code
4 snapshot()
5 Output
6 The following package(s) are missing their DESCRIPTION files:
7 - oatmeal [<wd>/renv/library/<platform-prefix>/oatmeal]
8 These may be left over from a prior, failed installation attempt.
9 Consider removing or reinstalling these packages.
10
11 The following required packages are not installed:
12 - oatmeal
13 Packages must first be installed before renv can snapshot them.
14 Use `renv::dependencies()` to see where this package is used in your project.
15
16 What do you want to do?
17
18 1: Snapshot, just using the currently installed packages.
19 2: Install the packages, then snapshot.
20 3: Cancel, and resolve the situation on your own.
21
22 Selection: 1
23
24 The following package(s) will be updated in the lockfile:
25
26 # CRAN ---
27 - oatmeal [1.0.0 -> *]
28
29 - Lockfile written to "<wd>/renv.lock".
30
31 # broken symlinks are reported
32
33 Code
34 snapshot()
35 Output
36 The following package(s) have broken symlinks into the cache:
37 - oatmeal
38 Use `renv::repair()` to try and reinstall these packages.
39
40 The following required packages are not installed:
41 - oatmeal
42 Packages must first be installed before renv can snapshot them.
43 Use `renv::dependencies()` to see where this package is used in your project.
44
45 What do you want to do?
46
47 1: Snapshot, just using the currently installed packages.
48 2: Install the packages, then snapshot.
49 3: Cancel, and resolve the situation on your own.
50
51 Selection: 1
52
53 The following package(s) will be updated in the lockfile:
54
55 # CRAN ---
56 - oatmeal [1.0.0 -> *]
57
58 - Lockfile written to "<wd>/renv.lock".
59
60 # snapshot warns about unsatisfied dependencies
61
62 Code
63 snapshot()
64 Output
65 The following package(s) have unsatisfied dependencies:
66 - toast requires bread (> 1.0.0), but version 1.0.0 is installed
67 Consider updating the required dependencies as appropriate.
68
69 Condition
70 Error in `renv_snapshot_validate_report()`:
71 ! aborting snapshot due to pre-flight validation failure
72
73 # renv reports missing packages in explicit snapshots
74
75 Code
76 snapshot(type = "explicit")
77 Output
78 The following required packages are not installed:
79 - breakfast
80 Packages must first be installed before renv can snapshot them.
81 If these packages are no longer required, consider removing them from your DESCRIPTION file.
82
83 What do you want to do?
84
85 1: Snapshot, just using the currently installed packages.
86 2: Install the packages, then snapshot.
87 3: Cancel, and resolve the situation on your own.
88
89 Selection: 1
90
91 - The lockfile is already up to date.
92
93 # snapshot() warns when required package is not installed
94
95 Code
96 snapshot()
97 Output
98 The following required packages are not installed:
99 - breakfast
100 Packages must first be installed before renv can snapshot them.
101 Use `renv::dependencies()` to see where this package is used in your project.
102
103 What do you want to do?
104
105 1: Snapshot, just using the currently installed packages.
106 2: Install the packages, then snapshot.
107 3: Cancel, and resolve the situation on your own.
108
109 Selection: 1
110
111 The following package(s) will be updated in the lockfile:
112
113 # CRAN ---
114 - bread [1.0.0 -> *]
115 - breakfast [1.0.0 -> *]
116 - oatmeal [1.0.0 -> *]
117 - toast [1.0.0 -> *]
118
119 - Lockfile written to "<wd>/renv.lock".
120
121 ---
122
123 Code
124 snapshot()
125 Output
126 The following required packages are not installed:
127 - toast [required by breakfast]
128 Consider reinstalling these packages before snapshotting the lockfile.
129
130 Condition
131 Error in `renv_snapshot_validate_report()`:
132 ! aborting snapshot due to pre-flight validation failure
133
134 # snapshot always reports on R version changes
135
136 Code
137 renv_snapshot_report_actions(list(), R4.1, R4.2)
138 Output
139 The version of R recorded in the lockfile will be updated:
140 - R [4.1 -> 4.2]
141
142
143 # user can choose to install missing packages
144
145 Code
146 snapshot()
147 Output
148 The following required packages are not installed:
149 - egg
150 Packages must first be installed before renv can snapshot them.
151 Use `renv::dependencies()` to see where this package is used in your project.
152
153 What do you want to do?
154
155 1: Snapshot, just using the currently installed packages.
156 2: Install the packages, then snapshot.
157 3: Cancel, and resolve the situation on your own.
158
159 Selection: 2
160
161 The following package(s) will be installed:
162 - egg [1.0.0]
163 These packages will be installed into "<tempdir>/<renv-library>".
164
165 # Downloading packages ---
166 ✔ egg 1.0.0
167 Successfully downloaded 1 package in XXXX seconds.
168
169 # Installing packages ---
170 ✔ egg 1.0.0 [built from source]
171 Successfully installed 1 package in XXXX seconds.
172 The following package(s) will be updated in the lockfile:
173
174 # CRAN ---
175 - egg [* -> 1.0.0]
176
177 The version of R recorded in the lockfile will be updated:
178 - R [* -> <r-version>]
179
180 - Lockfile written to "<wd>/renv.lock".
181
182 # automatic snapshot works as expected
183
184 Code
185 renv_snapshot_task()
186 Output
187 - Automatic snapshot has updated '<wd>/renv.lock'.
188
189 # we report if dependency discover during snapshot() is slow
190
191 Code
192 . <- snapshot()
193 Output
194
195 NOTE: Dependency discovery took XXXX seconds during snapshot.
196 Consider using .renvignore to ignore files, or switching to explicit snapshots.
197 See `?renv::dependencies` for more information.
198
199 - The lockfile is already up to date.
200
201 # failures in automatic snapshots disable automatic snapshots
202
203 Code
204 renv_snapshot_task()
205 Output
206 Error generating automatic snapshot: simulated failure in snapshot task
207 Automatic snapshots will be disabled. Use `renv::snapshot()` to manually update the lockfile.
208
209 # snapshot() reports missing packages even if renv.verbose is FALSE
210
211 Code
212 . <- snapshot(force = TRUE)
213 Output
214 The following required packages are not installed:
215 - bread
216 Packages must first be installed before renv can snapshot them.
217 Use `renv::dependencies()` to see where this package is used in your project.
218
219 What do you want to do?
220
221 1: Snapshot, just using the currently installed packages.
222 2: Install the packages, then snapshot.
223 3: Cancel, and resolve the situation on your own.
224
225 Selection: 1
226
227 - The lockfile is already up to date.
228
229 # lockfiles are stable (v1)
230
231 Code
232 . <- writeLines(readLines("renv.lock"))
233 Output
234 {
235 "R": {
236 "Version": "<r-version>",
237 "Repositories": [
238 {
239 "Name": "CRAN",
240 "URL": "<test-repo>"
241 }
242 ]
243 },
244 "Packages": {
245 "bread": {
246 "Package": "bread",
247 "Version": "1.0.0",
248 "Source": "Repository",
249 "Repository": "CRAN",
250 "Hash": "3d2aa8db4086921058b23ce646e01c7a"
251 },
252 "breakfast": {
253 "Package": "breakfast",
254 "Version": "1.0.0",
255 "Source": "Repository",
256 "Repository": "CRAN",
257 "Requirements": [
258 "oatmeal",
259 "toast"
260 ],
261 "Hash": "0fcd2a795901b4b21326a3e35442c97c"
262 },
263 "oatmeal": {
264 "Package": "oatmeal",
265 "Version": "1.0.0",
266 "Source": "Repository",
267 "Repository": "CRAN",
268 "Hash": "1997110c04a1a14551dc791abb7cf8cf"
269 },
270 "toast": {
271 "Package": "toast",
272 "Version": "1.0.0",
273 "Source": "Repository",
274 "Repository": "CRAN",
275 "Requirements": [
276 "bread"
277 ],
278 "Hash": "d2f51ee89552a4668cbe9fc25b1f7c1e"
279 }
280 }
281 }
282
283 # lockfiles are stable (v2)
284
285 Code
286 . <- writeLines(readLines("renv.lock"))
287 Output
288 {
289 "R": {
290 "Version": "<r-version>",
291 "Repositories": [
292 {
293 "Name": "CRAN",
294 "URL": "<test-repo>"
295 }
296 ]
297 },
298 "Packages": {
299 "bread": {
300 "Package": "bread",
301 "Version": "1.0.0",
302 "Source": "Repository",
303 "Type": "Package",
304 "Repository": "CRAN",
305 "License": "GPL",
306 "Description": "renv test package",
307 "Title": "renv test package",
308 "Author": "Anonymous Person <[email protected]>",
309 "Maintainer": "Anonymous Person <[email protected]>",
310 "Config/Needs/protein": "egg"
311 },
312 "breakfast": {
313 "Package": "breakfast",
314 "Version": "1.0.0",
315 "Source": "Repository",
316 "Type": "Package",
317 "Depends": [
318 "oatmeal",
319 "toast (>= 1.0.0)"
320 ],
321 "Suggests": [
322 "egg"
323 ],
324 "Repository": "CRAN",
325 "License": "GPL",
326 "Description": "renv test package",
327 "Title": "renv test package",
328 "Author": "Anonymous Person <[email protected]>",
329 "Maintainer": "Anonymous Person <[email protected]>",
330 "Config/Needs/protein": "egg"
331 },
332 "oatmeal": {
333 "Package": "oatmeal",
334 "Version": "1.0.0",
335 "Source": "Repository",
336 "Type": "Package",
337 "Repository": "CRAN",
338 "License": "GPL",
339 "Description": "renv test package",
340 "Title": "renv test package",
341 "Author": "Anonymous Person <[email protected]>",
342 "Maintainer": "Anonymous Person <[email protected]>"
343 },
344 "toast": {
345 "Package": "toast",
346 "Version": "1.0.0",
347 "Source": "Repository",
348 "Depends": [
349 "bread"
350 ],
351 "Type": "Package",
352 "Repository": "CRAN",
353 "License": "GPL",
354 "Description": "renv test package",
355 "Title": "renv test package",
356 "Author": "Anonymous Person <[email protected]>",
357 "Maintainer": "Anonymous Person <[email protected]>"
358 }
359 }
360 }
361