@@ -24,6 +24,7 @@ import '../builder/build_step_impl.dart';
24
24
import '../builder/builder.dart' ;
25
25
import '../logging/logging.dart' ;
26
26
import '../package_graph/package_graph.dart' ;
27
+ import '../util/constants.dart' ;
27
28
import 'build_result.dart' ;
28
29
import 'exceptions.dart' ;
29
30
import 'input_set.dart' ;
@@ -32,24 +33,26 @@ import 'phase.dart';
32
33
33
34
/// Class which manages running builds.
34
35
class BuildImpl {
35
- AssetGraph _assetGraph;
36
- AssetGraph get assetGraph => _assetGraph;
37
-
38
- final AssetReader _reader;
39
- final AssetWriter _writer;
40
- final PackageGraph _packageGraph;
36
+ final AssetId _assetGraphId;
41
37
final List <List <BuildAction >> _buildActions;
42
38
final _inputsByPackage = < String , Set <AssetId >> {};
43
- bool _buildRunning = false ;
44
39
final _logger = new Logger ('Build' );
40
+ final PackageGraph _packageGraph;
41
+ final AssetReader _reader;
42
+ final AssetWriter _writer;
45
43
44
+ AssetGraph _assetGraph;
45
+ AssetGraph get assetGraph => _assetGraph;
46
+ bool _buildRunning = false ;
46
47
bool _isFirstBuild = true ;
47
48
48
49
BuildImpl (BuildOptions options, PhaseGroup phaseGroup)
49
- : _reader = options.reader,
50
- _writer = options.writer,
50
+ : _assetGraphId =
51
+ new AssetId (options.packageGraph.root.name, assetGraphPath),
52
+ _buildActions = phaseGroup.buildActions,
51
53
_packageGraph = options.packageGraph,
52
- _buildActions = phaseGroup.buildActions;
54
+ _reader = options.reader,
55
+ _writer = options.writer;
53
56
54
57
/// Runs a build
55
58
///
@@ -166,10 +169,6 @@ class BuildImpl {
166
169
return result;
167
170
}
168
171
169
- /// Asset containing previous asset dependency graph.
170
- AssetId get _assetGraphId =>
171
- new AssetId (_packageGraph.root.name, '.dart_tool/build/asset_graph.json' );
172
-
173
172
/// Reads in the [assetGraph] from disk.
174
173
Future <AssetGraph > _readAssetGraph () async {
175
174
if (! await _reader.hasInput (_assetGraphId)) return new AssetGraph ();
@@ -360,7 +359,7 @@ class BuildImpl {
360
359
361
360
stdout.writeln ('\n\n Found ${conflictingOutputs .length } declared outputs '
362
361
'which already exist on disk. This is likely because the'
363
- '`.dart_tool/build ` folder was deleted, or you are submitting generated '
362
+ '`$ cacheDir ` folder was deleted, or you are submitting generated '
364
363
'files to your source repository.' );
365
364
var done = false ;
366
365
while (! done) {
0 commit comments