File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,34 @@ use once_cell::sync::Lazy;
35
35
#[ cfg( test) ]
36
36
mod tests;
37
37
38
+ /// Builds and performs different [`Self::kind`]s of stuff and actions, taking
39
+ /// into account build configuration from e.g. config.toml.
38
40
pub struct Builder < ' a > {
41
+ /// Build configuration from e.g. config.toml.
39
42
pub build : & ' a Build ,
43
+
44
+ /// The stage to use. Either implicitly determined based on subcommand, or
45
+ /// explicitly specified with `--stage N`. Normally this is the stage we
46
+ /// use, but sometimes we want to run steps with a lower stage than this.
40
47
pub top_stage : u32 ,
48
+
49
+ /// What to build or what action to perform.
41
50
pub kind : Kind ,
51
+
52
+ /// A cache of outputs of [`Step`]s so we can avoid running steps we already
53
+ /// ran.
42
54
cache : Cache ,
55
+
56
+ /// A stack of [`Step`]s to run before we can run this builder. The output
57
+ /// of steps is cached in [`Self::cache`].
43
58
stack : RefCell < Vec < Box < dyn Any > > > ,
59
+
60
+ /// The total amount of time we spent running [`Step`]s in [`Self::stack`].
44
61
time_spent_on_dependencies : Cell < Duration > ,
62
+
63
+ /// The paths passed on the command line. Used by steps to figure out what
64
+ /// to do. For example: with `./x check foo bar` we get `paths=["foo",
65
+ /// "bar"]`.
45
66
pub paths : Vec < PathBuf > ,
46
67
}
47
68
Original file line number Diff line number Diff line change @@ -345,6 +345,8 @@ pub struct Config {
345
345
#[ cfg( test) ]
346
346
pub initial_rustfmt : RefCell < RustfmtState > ,
347
347
348
+ /// The paths to work with. For example: with `./x check foo bar` we get
349
+ /// `paths=["foo", "bar"]`.
348
350
pub paths : Vec < PathBuf > ,
349
351
}
350
352
You can’t perform that action at this time.
0 commit comments