Unverified Commit 199422cd authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Skip first time full dill transfer (#21133)

* Don't sync first full kernel file.

* Update the comment
parent d107ff9d
...@@ -509,16 +509,20 @@ class DevFS { ...@@ -509,16 +509,20 @@ class DevFS {
outputPath: dillOutputPath ?? fs.path.join(getBuildDirectory(), 'app.dill'), outputPath: dillOutputPath ?? fs.path.join(getBuildDirectory(), 'app.dill'),
packagesFilePath : _packagesFilePath, packagesFilePath : _packagesFilePath,
); );
final String compiledBinary = compilerOutput?.outputFilename; // Don't send full kernel file that would overwrite what VM already
if (compiledBinary != null && compiledBinary.isNotEmpty) { // started loading from.
final Uri entryUri = fs.path.toUri(projectRootPath != null if (!bundleFirstUpload) {
? fs.path.relative(pathToReload, from: projectRootPath) final String compiledBinary = compilerOutput?.outputFilename;
: pathToReload, if (compiledBinary != null && compiledBinary.isNotEmpty) {
); final Uri entryUri = fs.path.toUri(projectRootPath != null
if (!dirtyEntries.containsKey(entryUri)) { ? fs.path.relative(pathToReload, from: projectRootPath)
final DevFSFileContent content = DevFSFileContent(fs.file(compiledBinary)); : pathToReload,
dirtyEntries[entryUri] = content; );
numBytes += content.size; if (!dirtyEntries.containsKey(entryUri)) {
final DevFSFileContent content = DevFSFileContent(fs.file(compiledBinary));
dirtyEntries[entryUri] = content;
numBytes += content.size;
}
} }
} }
if (dirtyEntries.isNotEmpty) { if (dirtyEntries.isNotEmpty) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment