mirror of
https://github.com/Zenithsiz/zbuild.git
synced 2026-02-03 22:23:53 +00:00
Removed BuildResult::built_here.
It always had the same value as `built`.
This commit is contained in:
parent
b08e2c4fbc
commit
c0760b7ffd
@ -240,7 +240,6 @@ impl<'s> Builder<'s> {
|
||||
return Ok((
|
||||
BuildResult {
|
||||
build_time,
|
||||
built_here: false,
|
||||
built: false,
|
||||
},
|
||||
None,
|
||||
@ -253,7 +252,6 @@ impl<'s> Builder<'s> {
|
||||
// Note: We simply pretend the file was built right now
|
||||
// TODO: Check if we should instead use a really old time?
|
||||
build_time: SystemTime::now(),
|
||||
built_here: false,
|
||||
built: false,
|
||||
},
|
||||
None,
|
||||
@ -524,7 +522,6 @@ impl<'s> Builder<'s> {
|
||||
let cur_build_time = self::rule_last_build_time(rule).await?.unwrap_or_else(SystemTime::now);
|
||||
let res = BuildResult {
|
||||
build_time: cur_build_time,
|
||||
built_here: needs_rebuilt,
|
||||
built: needs_rebuilt,
|
||||
};
|
||||
|
||||
|
||||
@ -13,10 +13,6 @@ pub struct BuildResult {
|
||||
/// Build time
|
||||
pub build_time: SystemTime,
|
||||
|
||||
/// If this task was the one who built it
|
||||
// TODO: Rename to something here
|
||||
pub built_here: bool,
|
||||
|
||||
/// If built from a rule
|
||||
pub built: bool,
|
||||
}
|
||||
|
||||
@ -223,17 +223,18 @@ async fn build_target<'s, T: BuildableTargetInner<'s> + fmt::Display + fmt::Debu
|
||||
let build_start_time = SystemTime::now();
|
||||
let res = T::build(target, builder, rules, ignore_missing).await;
|
||||
|
||||
// Then check if we did it
|
||||
// Then check the status
|
||||
match res {
|
||||
Ok(build_res) => {
|
||||
if build_res.built_here {
|
||||
// If we actually built the rule, and it didn't just exist, log it
|
||||
if build_res.built {
|
||||
let build_duration = build_res
|
||||
.build_time
|
||||
.duration_since(build_start_time)
|
||||
.unwrap_or(Duration::ZERO);
|
||||
tracing::debug!("Built target {target} in {build_duration:.2?}");
|
||||
println!("{target}");
|
||||
};
|
||||
}
|
||||
|
||||
Ok(())
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user