[flutter_tools] remove workaround for caching sound dill (#70014)
This commit is contained in:
@@ -29,12 +29,10 @@ String get defaultDepfilePath => globals.fs.path.join(getBuildDirectory(), 'snap
|
||||
|
||||
String getDefaultApplicationKernelPath({
|
||||
@required bool trackWidgetCreation,
|
||||
@required NullSafetyMode nullSafetyMode,
|
||||
}) {
|
||||
return getKernelPathForTransformerOptions(
|
||||
globals.fs.path.join(getBuildDirectory(), 'app.dill'),
|
||||
trackWidgetCreation: trackWidgetCreation,
|
||||
nullSafetyMode: nullSafetyMode,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -42,7 +40,6 @@ String getDefaultCachedKernelPath({
|
||||
@required bool trackWidgetCreation,
|
||||
@required List<String> dartDefines,
|
||||
@required List<String> extraFrontEndOptions,
|
||||
@required NullSafetyMode nullSafetyMode,
|
||||
}) {
|
||||
final StringBuffer buffer = StringBuffer();
|
||||
buffer.writeAll(dartDefines);
|
||||
@@ -56,21 +53,13 @@ String getDefaultCachedKernelPath({
|
||||
return getKernelPathForTransformerOptions(
|
||||
globals.fs.path.join(getBuildDirectory(), '${buildPrefix}cache.dill'),
|
||||
trackWidgetCreation: trackWidgetCreation,
|
||||
nullSafetyMode: nullSafetyMode,
|
||||
);
|
||||
}
|
||||
|
||||
String getKernelPathForTransformerOptions(
|
||||
String path, {
|
||||
@required bool trackWidgetCreation,
|
||||
@required NullSafetyMode nullSafetyMode,
|
||||
}) {
|
||||
// Temporary work around until --initialize-from-dill accounts for sound mode.
|
||||
// The tool does not know the compilation mode if [NullSafetyMode.autodetect] is
|
||||
// selected.
|
||||
if (nullSafetyMode == NullSafetyMode.sound) {
|
||||
path += '.sound';
|
||||
}
|
||||
if (trackWidgetCreation) {
|
||||
path += '.track.dill';
|
||||
}
|
||||
|
||||
@@ -123,7 +123,6 @@ class FlutterDevice {
|
||||
trackWidgetCreation: buildInfo.trackWidgetCreation,
|
||||
dartDefines: buildInfo.dartDefines,
|
||||
extraFrontEndOptions: extraFrontEndOptions,
|
||||
nullSafetyMode: buildInfo.nullSafetyMode,
|
||||
),
|
||||
targetModel: TargetModel.dartdevc,
|
||||
extraFrontEndOptions: extraFrontEndOptions,
|
||||
@@ -165,7 +164,6 @@ class FlutterDevice {
|
||||
trackWidgetCreation: buildInfo.trackWidgetCreation,
|
||||
dartDefines: buildInfo.dartDefines,
|
||||
extraFrontEndOptions: extraFrontEndOptions,
|
||||
nullSafetyMode: buildInfo.nullSafetyMode,
|
||||
),
|
||||
packagesPath: buildInfo.packagesPath,
|
||||
artifacts: globals.artifacts,
|
||||
@@ -1181,7 +1179,6 @@ abstract class ResidentRunner {
|
||||
trackWidgetCreation: trackWidgetCreation,
|
||||
dartDefines: debuggingOptions.buildInfo.dartDefines,
|
||||
extraFrontEndOptions: debuggingOptions.buildInfo.extraFrontEndOptions,
|
||||
nullSafetyMode: debuggingOptions.buildInfo.nullSafetyMode,
|
||||
);
|
||||
globals.fs
|
||||
.file(copyPath)
|
||||
|
||||
@@ -330,7 +330,6 @@ class HotRunner extends ResidentRunner {
|
||||
outputPath: dillOutputPath ??
|
||||
getDefaultApplicationKernelPath(
|
||||
trackWidgetCreation: debuggingOptions.buildInfo.trackWidgetCreation,
|
||||
nullSafetyMode: debuggingOptions.buildInfo.nullSafetyMode,
|
||||
),
|
||||
packageConfig: packageConfig,
|
||||
).then((CompilerOutput output) => output?.errorCount == 0)
|
||||
|
||||
@@ -45,7 +45,6 @@ class TestCompiler {
|
||||
'test_cache',
|
||||
getDefaultCachedKernelPath(
|
||||
trackWidgetCreation: buildInfo.trackWidgetCreation,
|
||||
nullSafetyMode: buildInfo.nullSafetyMode,
|
||||
dartDefines: buildInfo.dartDefines,
|
||||
extraFrontEndOptions: buildInfo.extraFrontEndOptions,
|
||||
)) {
|
||||
|
||||
@@ -153,7 +153,6 @@ class FlutterTesterDevice extends Device {
|
||||
final String applicationKernelFilePath = getKernelPathForTransformerOptions(
|
||||
_fileSystem.path.join(_buildDirectory, 'flutter-tester-app.dill'),
|
||||
trackWidgetCreation: buildInfo.trackWidgetCreation,
|
||||
nullSafetyMode: buildInfo.nullSafetyMode,
|
||||
);
|
||||
// Build assets and perform initial compilation.
|
||||
await BundleBuilder().build(
|
||||
|
||||
Reference in New Issue
Block a user