@@ -189,13 +189,18 @@ impl Ord for Commit {
189
189
}
190
190
}
191
191
192
+ /// The compilation profile (i.e., how the crate was built)
192
193
#[ derive(
193
194
Debug , Copy , Clone , PartialEq , Eq , Hash , PartialOrd , Ord , serde:: Serialize , serde:: Deserialize ,
194
195
) ]
195
196
pub enum Profile {
197
+ /// A checked build (i.e., no codegen)
196
198
Check ,
199
+ /// A debug build (i.e., low optimizations)
197
200
Debug ,
201
+ /// A doc build
198
202
Doc ,
203
+ /// An optimized "release" build
199
204
Opt ,
200
205
}
201
206
@@ -227,15 +232,23 @@ impl fmt::Display for Profile {
227
232
}
228
233
}
229
234
235
+ /// The incremental cache state
236
+ ///
237
+ /// These are usually reported to users in a "flipped" way. For example,
238
+ /// `Cache::Empty` means we're doing a "full" build. We present this to users as "full".
230
239
#[ derive( Debug , Copy , Clone , PartialEq , Eq , Hash , serde:: Serialize , serde:: Deserialize ) ]
231
240
#[ serde( tag = "variant" , content = "name" ) ]
232
241
pub enum Cache {
242
+ /// Empty cache (i.e., full build)
233
243
#[ serde( rename = "full" ) ]
234
244
Empty ,
245
+ /// Empty cache but still incremental (i.e., a full incremental build)
235
246
#[ serde( rename = "incr-full" ) ]
236
247
IncrementalEmpty ,
248
+ /// Cache is fully up-to-date (i.e., nothing has changed)
237
249
#[ serde( rename = "incr-unchanged" ) ]
238
250
IncrementalFresh ,
251
+ /// Cache is mostly up-to-date but something has been changed
239
252
#[ serde( rename = "incr-patched" ) ]
240
253
IncrementalPatch ( PatchName ) ,
241
254
}
@@ -437,16 +450,26 @@ pub struct LabelId(pub u8, pub u32);
437
450
#[ derive( Serialize , Deserialize , Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash , Debug ) ]
438
451
pub struct ArtifactIdNumber ( pub u32 ) ;
439
452
440
- /// Cached results of various queries.
453
+ /// Id lookups for various things
454
+ ///
455
+ /// This is a quick way to find what the database id for something
441
456
#[ derive( Debug , Clone , PartialEq , Eq , Default ) ]
442
457
pub struct Index {
458
+ /// Id look for a commit
443
459
commits : Indexed < Commit > ,
460
+ /// Id lookup of the errors for a crate
444
461
artifacts : Indexed < Box < str > > ,
462
+ /// Id lookup of the errors for a crate
445
463
errors : Indexed < Crate > ,
464
+ /// Id lookup of a given process stastic profile
446
465
pstats : Indexed < ( Crate , Profile , Cache , ProcessStatistic ) > ,
466
+ /// Id lookup of a given process query label
447
467
queries : Indexed < ( Crate , Profile , Cache , QueryLabel ) > ,
448
468
}
449
469
470
+ /// An index lookup
471
+ ///
472
+ /// Given a `T` find what its database id is
450
473
#[ derive( Debug , Clone , Serialize , Deserialize ) ]
451
474
struct Indexed < T > {
452
475
#[ serde( with = "index_serde" ) ]
0 commit comments