Skip to content

Commit a4a26ca

Browse files
authored
Remove unused bool. (#4171)
1 parent 1f0729d commit a4a26ca

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

build_runner_core/lib/src/generate/build_definition.dart

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,14 @@ class BuildDefinition {
2929
final AssetGraph assetGraph;
3030
final BuildScriptUpdates? buildScriptUpdates;
3131

32-
/// Whether this is a build starting from no previous state or outputs.
33-
final bool cleanBuild;
34-
3532
/// When reusing serialized state from a previous build: the file updates
3633
/// since that build.
3734
///
3835
/// Or, `null` if there was no serialized state or it was discared due to
3936
/// the current build having an incompatible change.
4037
final Map<AssetId, ChangeType>? updates;
4138

42-
BuildDefinition._(
43-
this.assetGraph,
44-
this.buildScriptUpdates,
45-
this.cleanBuild,
46-
this.updates,
47-
);
39+
BuildDefinition._(this.assetGraph, this.buildScriptUpdates, this.updates);
4840

4941
static Future<BuildDefinition> prepareWorkspace({
5042
required PackageGraph packageGraph,
@@ -100,9 +92,7 @@ class _Loader {
10092

10193
BuildScriptUpdates? buildScriptUpdates;
10294
Map<AssetId, ChangeType>? updates;
103-
var cleanBuild = true;
10495
if (assetGraph != null) {
105-
cleanBuild = false;
10696
buildLog.doing('Checking for updates.');
10797
updates = await _computeUpdates(
10898
assetGraph,
@@ -138,7 +128,6 @@ class _Loader {
138128
assetGraph = null;
139129
buildScriptUpdates = null;
140130
updates = null;
141-
cleanBuild = true;
142131
}
143132
}
144133

@@ -192,12 +181,7 @@ class _Loader {
192181
await _initialBuildCleanup(conflictingOutputs, writer);
193182
}
194183

195-
return BuildDefinition._(
196-
assetGraph,
197-
buildScriptUpdates,
198-
cleanBuild,
199-
updates,
200-
);
184+
return BuildDefinition._(assetGraph, buildScriptUpdates, updates);
201185
}
202186

203187
/// Deletes the generated output directory.

build_runner_core/lib/src/generate/build_series.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ class BuildSeries {
5151
/// if the serialized build state was discarded.
5252
Map<AssetId, ChangeType>? updatesFromLoad;
5353

54-
/// Whether this is or was a build starting from no previous state or outputs.
55-
final bool cleanBuild;
56-
5754
/// Whether the next build is the first build.
5855
bool firstBuild = true;
5956

@@ -64,7 +61,6 @@ class BuildSeries {
6461
this.assetGraph,
6562
this.buildScriptUpdates,
6663
this.finalizedReader,
67-
this.cleanBuild,
6864
this.updatesFromLoad,
6965
) : readerWriter = buildPlan.reader.copyWith(
7066
generatedAssetHider: assetGraph,
@@ -149,7 +145,6 @@ class BuildSeries {
149145
buildDefinition.assetGraph,
150146
buildDefinition.buildScriptUpdates,
151147
finalizedReader,
152-
buildDefinition.cleanBuild,
153148
buildDefinition.updates,
154149
);
155150
return build;

0 commit comments

Comments
 (0)