@@ -15,7 +15,6 @@ import '../build_plan/build_plan.dart';
15
15
import '../io/filesystem_cache.dart' ;
16
16
import '../io/finalized_reader.dart' ;
17
17
import '../io/reader_writer.dart' ;
18
- import 'asset_graph/build_definition.dart' ;
19
18
import 'asset_graph/graph.dart' ;
20
19
import 'build.dart' ;
21
20
import 'build_result.dart' ;
@@ -47,7 +46,7 @@ class BuildSeries {
47
46
///
48
47
/// Null after the first build, or if there was no serialized build state, or
49
48
/// if the serialized build state was discarded.
50
- Map <AssetId , ChangeType >? updatesFromLoad;
49
+ BuiltMap <AssetId , ChangeType >? updatesFromLoad;
51
50
52
51
/// Whether the next build is the first build.
53
52
bool firstBuild = true ;
@@ -85,7 +84,7 @@ class BuildSeries {
85
84
buildFilters ?? = buildPlan.buildOptions.buildFilters;
86
85
if (firstBuild) {
87
86
if (updatesFromLoad != null ) {
88
- updates = updatesFromLoad! ..addAll (updates);
87
+ updates = updatesFromLoad! .toMap (). .addAll (updates);
89
88
updatesFromLoad = null ;
90
89
}
91
90
} else {
@@ -110,30 +109,20 @@ class BuildSeries {
110
109
}
111
110
112
111
static Future <BuildSeries > create ({required BuildPlan buildPlan}) async {
113
- final buildDefinition = await BuildDefinition .prepareWorkspace (
114
- assetGraph: buildPlan.takeAssetGraph (),
115
- packageGraph: buildPlan.packageGraph,
116
- targetGraph: buildPlan.targetGraph,
117
- readerWriter: buildPlan.readerWriter,
118
- buildPhases: buildPlan.buildPhases,
119
- skipBuildScriptCheck: buildPlan.buildOptions.skipBuildScriptCheck,
120
- );
121
-
112
+ final assetGraph = buildPlan.takeAssetGraph ();
122
113
final finalizedReader = FinalizedReader (
123
- buildPlan.readerWriter.copyWith (
124
- generatedAssetHider: buildDefinition.assetGraph,
125
- ),
126
- buildDefinition.assetGraph,
114
+ buildPlan.readerWriter.copyWith (generatedAssetHider: assetGraph),
115
+ assetGraph,
127
116
buildPlan.targetGraph,
128
117
buildPlan.buildPhases,
129
118
buildPlan.packageGraph.root.name,
130
119
);
131
120
final build = BuildSeries ._(
132
121
buildPlan,
133
- buildDefinition. assetGraph,
134
- buildDefinition .buildScriptUpdates,
122
+ assetGraph,
123
+ buildPlan .buildScriptUpdates,
135
124
finalizedReader,
136
- buildDefinition .updates,
125
+ buildPlan .updates,
137
126
);
138
127
return build;
139
128
}
0 commit comments