1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
|
{
"dead_code": {
"allowlist": {
"db.Migration": "the element type of `MIGRATIONS`, which is `pub` under `test-support`; narrowing it is `private_interfaces` - type `Migration` is more private than the item `MIGRATIONS`. Production walks the table through `db::migrate` without naming it",
"db.PackageRow": "what `index_packages` answers with, and `index_packages` is `pub`; narrowing the row is `private_interfaces` - type `PackageRow` is more private than the item `index_packages`. http, the publish step and the `aur-build` binary bind it without naming it",
"db.Subscription": "what `get_subscription` and `list_subscriptions` answer with, both `pub`; narrowing it is `private_interfaces` on `list_subscriptions`. `watch`, `usecase`, the binary and tests/detect.rs bind the value without naming the type",
"db.Unbuilt": "the attention row `approved_but_unbuilt` returns, and that fn is `pub`; narrowing it is `private_interfaces` on `approved_but_unbuilt`. The web UI and tests/crash.rs bind it without naming it",
"pkginfo.Installed": "what `parse_installed` answers with, and `parse_installed` is `pub`; narrowing it is `private_interfaces` on `parse_installed`. `pipeline`, `shims` and tests/world.rs read it line by line",
"pkginfo.PkgInfo": "what `parse_pkginfo` answers with, and `parse_pkginfo` is `pub`; narrowing it is `private_interfaces` on `parse_pkginfo`. `pipeline`, `shims` and tests/world.rs read its fields, never its name",
"review.BulkItem": "one outcome of `approve::bulk`, which is `pub` and which tests/approve.rs drives directly; narrowing the row is `private_interfaces` on `approve::bulk`",
"sandbox.ProvisionRequest": "the parameter of `Provisioner::provision`, a `pub` trait method - a `pub` trait method cannot take a `pub(crate)` parameter, so the compiler answers `type kata::ProvisionRequest is more private than the item kata::Provisioner::provision`",
"sandbox.Provisioner": "implemented by the test-gated `pub` `LocalAgentProvisioner` and returned by `KataBackend::bind`; a private trait on a public impl is E0445, and the compiler says `trait kata::Provisioner is more private than the item KataBackend::bind`",
"shims.FakeInstalled": "the element type of the `pub` field `Manifest::installed`, so narrowing it is `private_interfaces` on that field; the whole `shims` module is `test-support`-gated, so a release build never compiles it",
"shims.FakePackage": "the element type of the `pub` field `Manifest::packages`, so narrowing it is `private_interfaces` on that field; the whole `shims` module is `test-support`-gated, so a release build never compiles it",
"shims.Manifest": "returned by `manifest()`, which is `pub` and which seven test files read to assert what a build did; narrowing the type is `private_interfaces` on `manifest`. The module is `test-support`-gated",
"time.VirtualClock": "re-exported by the gated `pub use` that is the only public path to it; narrowing it is E0365 - `VirtualClock` is only public within the crate, and cannot be re-exported outside",
"usecase.Checked": "re-exported by `usecase`'s `pub use`, which is how the `aur-build` binary - a separate crate - names it; narrowing it is E0365, cannot be re-exported outside the crate",
"usecase.GcPlan": "re-exported by `usecase`'s `pub use` for the `aur-build` binary, a separate crate; narrowing it is E0365, cannot be re-exported outside the crate",
"usecase.Prepared": "re-exported by `usecase`'s `pub use` for the `aur-build` binary, a separate crate; narrowing it is E0365, cannot be re-exported outside the crate",
"watch.CheckReport": "what `detect::check_pkgbase` answers with, and that fn is `pub`; narrowing it is `private_interfaces` on `check_pkgbase`. The test tier drives it and binds the value without naming it",
"watch.StageA": "what `upstream::probe` answers with, and `probe` is `pub`; narrowing it is `private_interfaces` on `probe`. tests/ops.rs and tests/vcs.rs call `probe` directly"
},
"deadonly": {
"bin/gpg": 0,
"bin/makechrootpkg": 0,
"bin/makepkg": 0,
"bin/mkarchroot": 0,
"bin/pacman": 0,
"bin/repo-add": 0,
"bin/sandbox-agent": 0,
"config": 0,
"db": 0,
"error": 0,
"fetch": 0,
"git": 0,
"hash": 0,
"http": 0,
"lib": 0,
"main": 0,
"ops": 0,
"pipeline": 0,
"pkginfo": 0,
"pkgver": 0,
"recipe": 0,
"review": 0,
"sandbox": 0,
"shims": 0,
"time": 0,
"urlutil": 0,
"usecase": 0,
"watch": 0
}
},
"modules": {
"bin/gpg": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 4,
"largest_file": "src/bin/gpg.rs",
"lines": 4,
"overwide": 0,
"priv": 0,
"pub": 0,
"test": 0
},
"bin/makechrootpkg": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 4,
"largest_file": "src/bin/makechrootpkg.rs",
"lines": 4,
"overwide": 0,
"priv": 0,
"pub": 0,
"test": 0
},
"bin/makepkg": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 4,
"largest_file": "src/bin/makepkg.rs",
"lines": 4,
"overwide": 0,
"priv": 0,
"pub": 0,
"test": 0
},
"bin/mkarchroot": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 4,
"largest_file": "src/bin/mkarchroot.rs",
"lines": 4,
"overwide": 0,
"priv": 0,
"pub": 0,
"test": 0
},
"bin/pacman": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 4,
"largest_file": "src/bin/pacman.rs",
"lines": 4,
"overwide": 0,
"priv": 0,
"pub": 0,
"test": 0
},
"bin/repo-add": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 4,
"largest_file": "src/bin/repo-add.rs",
"lines": 4,
"overwide": 0,
"priv": 0,
"pub": 0,
"test": 0
},
"bin/sandbox-agent": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 50,
"largest_file": "src/bin/sandbox-agent.rs",
"lines": 50,
"overwide": 0,
"priv": 0,
"pub": 0,
"test": 0
},
"config": {
"dead": 2,
"deadonly": 0,
"glob": 0,
"largest": 699,
"largest_file": "src/config.rs",
"lines": 699,
"overwide": 0,
"priv": 0,
"pub": 29,
"test": 2
},
"db": {
"dead": 11,
"deadonly": 0,
"glob": 0,
"largest": 368,
"largest_file": "src/db/mod.rs",
"lines": 3890,
"overwide": 0,
"priv": 15,
"pub": 189,
"test": 11
},
"error": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 428,
"largest_file": "src/error.rs",
"lines": 428,
"overwide": 0,
"priv": 0,
"pub": 21,
"test": 0
},
"fetch": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 57,
"largest_file": "src/fetch.rs",
"lines": 57,
"overwide": 0,
"priv": 0,
"pub": 1,
"test": 0
},
"git": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 240,
"largest_file": "src/git.rs",
"lines": 240,
"overwide": 0,
"priv": 0,
"pub": 14,
"test": 0
},
"hash": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 112,
"largest_file": "src/hash.rs",
"lines": 112,
"overwide": 0,
"priv": 0,
"pub": 7,
"test": 0
},
"http": {
"dead": 5,
"deadonly": 0,
"glob": 0,
"largest": 565,
"largest_file": "src/http/routes/pages.rs",
"lines": 2035,
"overwide": 1,
"priv": 81,
"pub": 17,
"test": 5
},
"lib": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 23,
"largest_file": "src/lib.rs",
"lines": 23,
"overwide": 0,
"priv": 0,
"pub": 0,
"test": 0
},
"main": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 314,
"largest_file": "src/main.rs",
"lines": 314,
"overwide": 0,
"priv": 0,
"pub": 0,
"test": 0
},
"ops": {
"dead": 3,
"deadonly": 0,
"glob": 0,
"largest": 455,
"largest_file": "src/ops.rs",
"lines": 455,
"overwide": 0,
"priv": 2,
"pub": 11,
"test": 3
},
"pipeline": {
"dead": 6,
"deadonly": 0,
"glob": 0,
"largest": 472,
"largest_file": "src/pipeline/steps.rs",
"lines": 1410,
"overwide": 8,
"priv": 16,
"pub": 21,
"test": 6
},
"pkginfo": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 117,
"largest_file": "src/pkginfo.rs",
"lines": 117,
"overwide": 0,
"priv": 0,
"pub": 6,
"test": 0
},
"pkgver": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 559,
"largest_file": "src/pkgver/mod.rs",
"lines": 559,
"overwide": 0,
"priv": 0,
"pub": 7,
"test": 0
},
"recipe": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 459,
"largest_file": "src/recipe.rs",
"lines": 459,
"overwide": 0,
"priv": 0,
"pub": 7,
"test": 0
},
"review": {
"dead": 4,
"deadonly": 0,
"glob": 0,
"largest": 301,
"largest_file": "src/review/diff.rs",
"lines": 915,
"overwide": 0,
"priv": 4,
"pub": 24,
"test": 4
},
"sandbox": {
"dead": 7,
"deadonly": 0,
"glob": 0,
"largest": 507,
"largest_file": "src/sandbox/kata.rs",
"lines": 1408,
"overwide": 6,
"priv": 16,
"pub": 21,
"test": 7
},
"shims": {
"dead": 4,
"deadonly": 0,
"glob": 0,
"largest": 655,
"largest_file": "src/shims/mod.rs",
"lines": 655,
"overwide": 7,
"priv": 13,
"pub": 8,
"test": 4
},
"time": {
"dead": 3,
"deadonly": 0,
"glob": 0,
"largest": 245,
"largest_file": "src/time.rs",
"lines": 245,
"overwide": 0,
"priv": 0,
"pub": 13,
"test": 3
},
"urlutil": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 56,
"largest_file": "src/urlutil.rs",
"lines": 56,
"overwide": 0,
"priv": 0,
"pub": 1,
"test": 0
},
"usecase": {
"dead": 0,
"deadonly": 0,
"glob": 0,
"largest": 124,
"largest_file": "src/usecase/reviews.rs",
"lines": 405,
"overwide": 0,
"priv": 0,
"pub": 30,
"test": 0
},
"watch": {
"dead": 4,
"deadonly": 0,
"glob": 0,
"largest": 296,
"largest_file": "src/watch/upstream.rs",
"lines": 1115,
"overwide": 0,
"priv": 12,
"pub": 21,
"test": 4
}
},
"over_visibility": {
"allowlist": {
"db.OpenReview": "returned by `open_in` and taken by `collapse_in`, both `pub(crate)` in this file; a private type behind a `pub(crate)` signature is the `private_interfaces` warning, so the type has to be as visible as the functions that carry it",
"db.Readers": "`Db` is `pub` and its `readers` field is `pub(crate)`, and a field cannot out-reach its own type; making `Readers` private is the `private_interfaces` warning on `db::Db::readers`",
"db.ReviewSubject": "`review_subject_in` is `pub(crate)` and answers with it, and another file binds the value: with the type private that call site is `error: type ReviewSubject is private`",
"ops.EvictPlan": "`plan_retention` is `pub(crate)` and returns `Vec<EvictPlan>`; with the type private, the caller that binds that Vec in another file is `error: type EvictPlan is private`",
"pipeline.SourceIdentity": "the `pub(crate)` field `Ctx::src` has this type, and a field may not be more reachable than its type; private `SourceIdentity` is the `private_interfaces` warning on `Ctx::src`",
"review.Assessment": "`assess` is `pub(crate)` and answers with it, so a private `Assessment` is `error: type Assessment is private` at every site in another file that binds the result",
"review.LOW": "declared inside the `pub mod level` nested in risk.rs and read as `level::LOW` by the scorer in the parent module; privacy does not reach upward to a parent, and `pub(super)` is not a form this crate admits, so `pub(crate)` is the narrowest that works",
"sandbox.provision_request": "declared inside the private `kata_backend` module (kata.rs:184) and called from the sibling `#[cfg(test)] mod tests` (kata.rs:421); privacy does not cross to a sibling - E0624 - and `pub(super)` is not a form this crate admits"
},
"overwide": {
"bin/gpg": 0,
"bin/makechrootpkg": 0,
"bin/makepkg": 0,
"bin/mkarchroot": 0,
"bin/pacman": 0,
"bin/repo-add": 0,
"bin/sandbox-agent": 0,
"config": 0,
"db": 0,
"error": 0,
"fetch": 0,
"git": 0,
"hash": 0,
"http": 1,
"lib": 0,
"main": 0,
"ops": 0,
"pipeline": 8,
"pkginfo": 0,
"pkgver": 0,
"recipe": 0,
"review": 0,
"sandbox": 6,
"shims": 7,
"time": 0,
"urlutil": 0,
"usecase": 0,
"watch": 0
}
},
"test_surface": {
"already-gated": 21,
"interface": 1,
"narrowed": 14,
"total": 36
},
"totals": {
"dead": 49,
"deadonly": 0,
"edges": 87,
"glob": 0,
"largest": 699,
"largest_file": "src/config.rs",
"lines": 15671,
"overwide": 22,
"priv": 159,
"pub": 448,
"test": 49
}
}
|