Stop syncing dart source files when in --preview-dart-2. (#12597)
Syncing source files is not needed when host sends kernel file to the device.
This commit is contained in:
committed by
GitHub
parent
f74cd91761
commit
c05da1e29d
@@ -465,9 +465,21 @@ class DevFS {
|
|||||||
// Incremental run with no changes is supposed to be fast (considering
|
// Incremental run with no changes is supposed to be fast (considering
|
||||||
// that it is initiated by user key press).
|
// that it is initiated by user key press).
|
||||||
final List<String> invalidatedFiles = <String>[];
|
final List<String> invalidatedFiles = <String>[];
|
||||||
for (DevFSContent content in dirtyEntries.values)
|
final Set<Uri> filesUris = new Set<Uri>();
|
||||||
if (content is DevFSFileContent)
|
for (Uri uri in dirtyEntries.keys) {
|
||||||
invalidatedFiles.add(content.file.uri.toString());
|
if (!uri.path.startsWith(assetBuildDirPrefix)) {
|
||||||
|
final DevFSContent content = dirtyEntries[uri];
|
||||||
|
if (content is DevFSFileContent) {
|
||||||
|
filesUris.add(uri);
|
||||||
|
invalidatedFiles.add(content.file.uri.toString());
|
||||||
|
numBytes -= content.size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// No need to send source files because all compilation is done on the
|
||||||
|
// host and result of compilation is single kernel file.
|
||||||
|
for (Uri fileUri in filesUris)
|
||||||
|
dirtyEntries.remove(fileUri);
|
||||||
printTrace('Compiling dart to kernel with ${invalidatedFiles.length} updated files');
|
printTrace('Compiling dart to kernel with ${invalidatedFiles.length} updated files');
|
||||||
final String compiledBinary = fullRestart
|
final String compiledBinary = fullRestart
|
||||||
? await compile(
|
? await compile(
|
||||||
|
|||||||
Reference in New Issue
Block a user