mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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:
parent
f74cd91761
commit
c05da1e29d
@ -465,9 +465,21 @@ class DevFS {
|
||||
// Incremental run with no changes is supposed to be fast (considering
|
||||
// that it is initiated by user key press).
|
||||
final List<String> invalidatedFiles = <String>[];
|
||||
for (DevFSContent content in dirtyEntries.values)
|
||||
if (content is DevFSFileContent)
|
||||
invalidatedFiles.add(content.file.uri.toString());
|
||||
final Set<Uri> filesUris = new Set<Uri>();
|
||||
for (Uri uri in dirtyEntries.keys) {
|
||||
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');
|
||||
final String compiledBinary = fullRestart
|
||||
? await compile(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user