diff --git a/packages/flutter_tools/bin/macos_assemble.sh b/packages/flutter_tools/bin/macos_assemble.sh index 77835638e61..90fd88506ed 100755 --- a/packages/flutter_tools/bin/macos_assemble.sh +++ b/packages/flutter_tools/bin/macos_assemble.sh @@ -168,9 +168,6 @@ BuildApp() { if [[ -n "$PERFORMANCE_MEASUREMENT_FILE" ]]; then flutter_args+=("--performance-measurement-file=${PERFORMANCE_MEASUREMENT_FILE}") fi - if [[ -n "$BUNDLE_SKSL_PATH" ]]; then - flutter_args+=("-dBundleSkSLPath=${BUNDLE_SKSL_PATH}") - fi if [[ -n "$CODE_SIZE_DIRECTORY" ]]; then flutter_args+=("-dCodeSizeDirectory=${CODE_SIZE_DIRECTORY}") fi diff --git a/packages/flutter_tools/bin/tool_backend.dart b/packages/flutter_tools/bin/tool_backend.dart index 60a5ddb5a70..3eccc4dfef2 100644 --- a/packages/flutter_tools/bin/tool_backend.dart +++ b/packages/flutter_tools/bin/tool_backend.dart @@ -25,7 +25,6 @@ Future main(List arguments) async { final String? localEngineHost = Platform.environment['LOCAL_ENGINE_HOST']; final String? projectDirectory = Platform.environment['PROJECT_DIR']; final String? splitDebugInfo = Platform.environment['SPLIT_DEBUG_INFO']; - final String? bundleSkSLPath = Platform.environment['BUNDLE_SKSL_PATH']; final bool trackWidgetCreation = Platform.environment['TRACK_WIDGET_CREATION'] == 'true'; final bool treeShakeIcons = Platform.environment['TREE_SHAKE_ICONS'] == 'true'; final bool verbose = Platform.environment['VERBOSE_SCRIPT_LOGGING'] == 'true'; @@ -94,7 +93,6 @@ or '-dTargetFile=$flutterTarget', '-dTreeShakeIcons="$treeShakeIcons"', '-dDartObfuscation=$dartObfuscation', - if (bundleSkSLPath != null) '-dBundleSkSLPath=$bundleSkSLPath', if (codeSizeDirectory != null) '-dCodeSizeDirectory=$codeSizeDirectory', if (splitDebugInfo != null) '-dSplitDebugInfo=$splitDebugInfo', if (dartDefines != null) '--DartDefines=$dartDefines', diff --git a/packages/flutter_tools/bin/xcode_backend.dart b/packages/flutter_tools/bin/xcode_backend.dart index 4d64a11f4d0..b8d2e721c48 100644 --- a/packages/flutter_tools/bin/xcode_backend.dart +++ b/packages/flutter_tools/bin/xcode_backend.dart @@ -475,10 +475,6 @@ class Context { flutterArgs.add('-dCodesignIdentity=$expandedCodeSignIdentity'); } - if (environment['BUNDLE_SKSL_PATH'] != null && environment['BUNDLE_SKSL_PATH']!.isNotEmpty) { - flutterArgs.add('-dBundleSkSLPath=${environment['BUNDLE_SKSL_PATH']}'); - } - if (environment['CODE_SIZE_DIRECTORY'] != null && environment['CODE_SIZE_DIRECTORY']!.isNotEmpty) { flutterArgs.add('-dCodeSizeDirectory=${environment['CODE_SIZE_DIRECTORY']}'); diff --git a/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy b/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy index 21a71e430f1..332fc613309 100644 --- a/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy +++ b/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy @@ -1220,11 +1220,6 @@ class FlutterPlugin implements Plugin { if (project.hasProperty(propDartDefines)) { dartDefinesValue = project.property(propDartDefines) } - String bundleSkSLPathValue - final String propBundleSkslPath = "bundle-sksl-path" - if (project.hasProperty(propBundleSkslPath)) { - bundleSkSLPathValue = project.property(propBundleSkslPath) - } String performanceMeasurementFileValue final String propPerformanceMeasurementFile = "performance-measurement-file" if (project.hasProperty(propPerformanceMeasurementFile)) { @@ -1316,7 +1311,6 @@ class FlutterPlugin implements Plugin { treeShakeIcons(treeShakeIconsOptionsValue) dartObfuscation(dartObfuscationValue) dartDefines(dartDefinesValue) - bundleSkSLPath(bundleSkSLPathValue) performanceMeasurementFile(performanceMeasurementFileValue) codeSizeDirectory(codeSizeDirectoryValue) deferredComponents(deferredComponentsValue) @@ -1647,9 +1641,6 @@ abstract class BaseFlutterTask extends DefaultTask { @Optional @Input String dartDefines - @Optional @Input - String bundleSkSLPath - @Optional @Input String codeSizeDirectory @@ -1740,9 +1731,6 @@ abstract class BaseFlutterTask extends DefaultTask { if (dartDefines != null) { args("--DartDefines=${dartDefines}") } - if (bundleSkSLPath != null) { - args("-dBundleSkSLPath=${bundleSkSLPath}") - } if (codeSizeDirectory != null) { args("-dCodeSizeDirectory=${codeSizeDirectory}") } diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index 694e1953ef8..63c80e5b756 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart @@ -653,12 +653,6 @@ class AndroidDevice extends Device { if (debuggingOptions.traceSystrace) ...['--ez', 'trace-systrace', 'true'], if (traceToFile != null) ...['--es', 'trace-to-file', traceToFile], if (debuggingOptions.endlessTraceBuffer) ...['--ez', 'endless-trace-buffer', 'true'], - if (debuggingOptions.dumpSkpOnShaderCompilation) ...[ - '--ez', - 'dump-skp-on-shader-compilation', - 'true', - ], - if (debuggingOptions.cacheSkSL) ...['--ez', 'cache-sksl', 'true'], if (debuggingOptions.purgePersistentCache) ...[ '--ez', 'purge-persistent-cache', diff --git a/packages/flutter_tools/lib/src/base/command_help.dart b/packages/flutter_tools/lib/src/base/command_help.dart index 16b8f13b1c7..c0fad23fe25 100644 --- a/packages/flutter_tools/lib/src/base/command_help.dart +++ b/packages/flutter_tools/lib/src/base/command_help.dart @@ -47,11 +47,6 @@ class CommandHelp { 'debugDumpLayerTree', ); - late final CommandHelpOption M = _makeOption( - 'M', - 'Write SkSL shaders to a unique file in the project directory.', - ); - late final CommandHelpOption P = _makeOption( 'P', 'Toggle performance overlay.', diff --git a/packages/flutter_tools/lib/src/build_info.dart b/packages/flutter_tools/lib/src/build_info.dart index 88f46b73e29..6680a16ffbc 100644 --- a/packages/flutter_tools/lib/src/build_info.dart +++ b/packages/flutter_tools/lib/src/build_info.dart @@ -35,7 +35,6 @@ class BuildInfo { this.splitDebugInfoPath, this.dartObfuscation = false, List? dartDefines, - this.bundleSkSLPath, List? dartExperiments, required this.treeShakeIcons, this.performanceMeasurementFile, @@ -118,11 +117,6 @@ class BuildInfo { /// Whether to apply dart source code obfuscation. final bool dartObfuscation; - /// An optional path to a JSON containing object SkSL shaders. - /// - /// Currently this is only supported for Android builds. - final String? bundleSkSLPath; - /// Additional constant values to be made available in the Dart program. /// /// These values can be used with the const `fromEnvironment` constructors of @@ -294,7 +288,6 @@ class BuildInfo { if (splitDebugInfoPath != null) kSplitDebugInfo: splitDebugInfoPath!, kTrackWidgetCreation: trackWidgetCreation.toString(), kIconTreeShakerFlag: treeShakeIcons.toString(), - if (bundleSkSLPath != null) kBundleSkSLPath: bundleSkSLPath!, if (codeSizeDirectory != null) kCodeSizeDirectory: codeSizeDirectory!, if (fileSystemRoots.isNotEmpty) kFileSystemRoots: fileSystemRoots.join(','), if (fileSystemScheme != null) kFileSystemScheme: fileSystemScheme!, @@ -323,7 +316,6 @@ class BuildInfo { 'TREE_SHAKE_ICONS': treeShakeIcons.toString(), if (performanceMeasurementFile != null) 'PERFORMANCE_MEASUREMENT_FILE': performanceMeasurementFile!, - if (bundleSkSLPath != null) 'BUNDLE_SKSL_PATH': bundleSkSLPath!, 'PACKAGE_CONFIG': packageConfigPath, if (codeSizeDirectory != null) 'CODE_SIZE_DIRECTORY': codeSizeDirectory!, if (flavor != null) 'FLAVOR': flavor!, @@ -348,7 +340,6 @@ class BuildInfo { '-Ptree-shake-icons=$treeShakeIcons', if (performanceMeasurementFile != null) '-Pperformance-measurement-file=$performanceMeasurementFile', - if (bundleSkSLPath != null) '-Pbundle-sksl-path=$bundleSkSLPath', if (codeSizeDirectory != null) '-Pcode-size-directory=$codeSizeDirectory', for (final String projectArg in androidProjectArgs) '-P$projectArg', ]; @@ -975,9 +966,6 @@ const String kIconTreeShakerFlag = 'TreeShakeIcons'; /// Controls whether a web build should use local canvaskit or the CDN const String kUseLocalCanvasKitFlag = 'UseLocalCanvasKit'; -/// The input key for an SkSL bundle path. -const String kBundleSkSLPath = 'BundleSkSLPath'; - /// The define to pass build name const String kBuildName = 'BuildName'; diff --git a/packages/flutter_tools/lib/src/build_system/targets/assets.dart b/packages/flutter_tools/lib/src/build_system/targets/assets.dart index a2b28cd9de5..ebc0c668c37 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/assets.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/assets.dart @@ -8,9 +8,7 @@ import '../../artifacts.dart'; import '../../asset.dart'; import '../../base/common.dart'; import '../../base/file_system.dart'; -import '../../base/logger.dart'; import '../../build_info.dart'; -import '../../convert.dart'; import '../../dart/package_map.dart'; import '../../devfs.dart'; import '../../flutter_manifest.dart'; @@ -42,17 +40,6 @@ Future copyAssets( List additionalInputs = const [], String? flavor, }) async { - // Check for an SkSL bundle. - final String? shaderBundlePath = - environment.defines[kBundleSkSLPath] ?? environment.inputs[kBundleSkSLPath]; - final DevFSContent? skslBundle = processSkSLBundle( - shaderBundlePath, - engineVersion: environment.engineVersion, - fileSystem: environment.fileSystem, - logger: environment.logger, - targetPlatform: targetPlatform, - ); - final File pubspecFile = environment.projectDir.childFile('pubspec.yaml'); // Only the default asset bundle style is supported in assemble. final AssetBundle assetBundle = @@ -121,12 +108,6 @@ Future copyAssets( ), ); }), - if (skslBundle != null) - kSkSLShaderBundlePath: AssetBundleEntry( - skslBundle, - kind: AssetKind.regular, - transformers: const [], - ), }; await Future.wait( @@ -262,85 +243,9 @@ Future copyAssets( ); } final Depfile depfile = Depfile(inputs + assetBundle.additionalDependencies, outputs); - if (shaderBundlePath != null) { - final File skSLBundleFile = environment.fileSystem.file(shaderBundlePath).absolute; - depfile.inputs.add(skSLBundleFile); - } return depfile; } -/// The path of the SkSL JSON bundle included in flutter_assets. -const String kSkSLShaderBundlePath = 'io.flutter.shaders.json'; - -/// Validate and process an SkSL asset bundle in a [DevFSContent]. -/// -/// Returns `null` if the bundle was not provided, otherwise attempts to -/// validate the bundle. -/// -/// Throws [Exception] if the bundle is invalid due to formatting issues. -/// -/// If the current target platform is different than the platform constructed -/// for the bundle, a warning will be printed. -DevFSContent? processSkSLBundle( - String? bundlePath, { - required TargetPlatform targetPlatform, - required FileSystem fileSystem, - required Logger logger, - String? engineVersion, -}) { - if (bundlePath == null) { - return null; - } - // Step 1: check that file exists. - final File skSLBundleFile = fileSystem.file(bundlePath); - if (!skSLBundleFile.existsSync()) { - logger.printError('$bundlePath does not exist.'); - throw Exception('SkSL bundle was invalid.'); - } - - // Step 2: validate top level bundle structure. - Map? bundle; - try { - final Object? rawBundle = json.decode(skSLBundleFile.readAsStringSync()); - if (rawBundle is Map) { - bundle = rawBundle; - } else { - logger.printError('"$bundle" was not a JSON object: $rawBundle'); - throw Exception('SkSL bundle was invalid.'); - } - } on FormatException catch (err) { - logger.printError('"$bundle" was not a JSON object: $err'); - throw Exception('SkSL bundle was invalid.'); - } - // Step 3: Validate that: - // * The engine revision the bundle was compiled with - // is the same as the current revision. - // * The target platform is the same (this one is a warning only). - final String? bundleEngineRevision = bundle['engineRevision'] as String?; - if (bundleEngineRevision != engineVersion) { - logger.printError( - 'Expected Flutter $bundleEngineRevision, but found $engineVersion\n' - 'The SkSL bundle was produced with a different engine version. It must ' - 'be recreated for the current Flutter version.', - ); - throw Exception('SkSL bundle was invalid'); - } - - final TargetPlatform? bundlePlatform = switch (bundle['platform'] as String?) { - final String platform => getTargetPlatformForName(platform), - null => null, - }; - - if (bundlePlatform != targetPlatform) { - logger.printError( - 'The SkSL bundle was created for $bundlePlatform, but the current ' - 'platform is $targetPlatform. This may lead to less efficient shader ' - 'caching.', - ); - } - return DevFSStringContent(json.encode({'data': bundle['data']})); -} - /// Copy the assets defined in the flutter manifest into a build directory. class CopyAssets extends Target { const CopyAssets(); diff --git a/packages/flutter_tools/lib/src/commands/build_apk.dart b/packages/flutter_tools/lib/src/commands/build_apk.dart index adf2e1c0c80..15d520c91a4 100644 --- a/packages/flutter_tools/lib/src/commands/build_apk.dart +++ b/packages/flutter_tools/lib/src/commands/build_apk.dart @@ -29,7 +29,6 @@ class BuildApkCommand extends BuildSubCommand { addDartObfuscationOption(); usesDartDefineOption(); usesExtraDartFlagOptions(verboseHelp: verboseHelp); - addBundleSkSLPathOption(hide: !verboseHelp); addEnableExperimentation(hide: !verboseHelp); addBuildPerformanceFile(hide: !verboseHelp); addNullSafetyModeOptions(hide: !verboseHelp); diff --git a/packages/flutter_tools/lib/src/commands/build_appbundle.dart b/packages/flutter_tools/lib/src/commands/build_appbundle.dart index ca5f110dbe8..0a82f6430e1 100644 --- a/packages/flutter_tools/lib/src/commands/build_appbundle.dart +++ b/packages/flutter_tools/lib/src/commands/build_appbundle.dart @@ -32,7 +32,6 @@ class BuildAppBundleCommand extends BuildSubCommand { addDartObfuscationOption(); usesDartDefineOption(); usesExtraDartFlagOptions(verboseHelp: verboseHelp); - addBundleSkSLPathOption(hide: !verboseHelp); addBuildPerformanceFile(hide: !verboseHelp); usesTrackWidgetCreation(verboseHelp: verboseHelp); addNullSafetyModeOptions(hide: !verboseHelp); diff --git a/packages/flutter_tools/lib/src/commands/build_ios.dart b/packages/flutter_tools/lib/src/commands/build_ios.dart index 5d4928c7ac9..60396b78d66 100644 --- a/packages/flutter_tools/lib/src/commands/build_ios.dart +++ b/packages/flutter_tools/lib/src/commands/build_ios.dart @@ -677,7 +677,6 @@ abstract class _BuildIOSSubCommand extends BuildSubCommand { usesExtraDartFlagOptions(verboseHelp: verboseHelp); addEnableExperimentation(hide: !verboseHelp); addBuildPerformanceFile(hide: !verboseHelp); - addBundleSkSLPathOption(hide: !verboseHelp); addNullSafetyModeOptions(hide: !verboseHelp); usesAnalyzeSizeFlag(); argParser.addFlag( diff --git a/packages/flutter_tools/lib/src/commands/drive.dart b/packages/flutter_tools/lib/src/commands/drive.dart index 0aacaa31139..29825d909ba 100644 --- a/packages/flutter_tools/lib/src/commands/drive.dart +++ b/packages/flutter_tools/lib/src/commands/drive.dart @@ -154,12 +154,6 @@ class DriveCommand extends RunCommandBase { 'Location of the Chrome binary. ' 'Works only if "browser-name" is set to "chrome".', ) - ..addOption( - 'write-sksl-on-exit', - help: - 'Attempts to write an SkSL file when the drive process is finished ' - 'to the provided file, overwriting it if necessary.', - ) ..addMultiOption( 'test-arguments', help: @@ -381,11 +375,7 @@ class DriveCommand extends RunCommandBase { if (boolArg('keep-app-running')) { _logger.printStatus('Leaving the application running.'); } else { - final File? skslFile = - stringArg('write-sksl-on-exit') != null - ? _fileSystem.file(stringArg('write-sksl-on-exit')) - : null; - await driverService.stop(userIdentifier: userIdentifier, writeSkslOnExit: skslFile); + await driverService.stop(userIdentifier: userIdentifier); } if (testResult != 0) { throwToolExit(null); diff --git a/packages/flutter_tools/lib/src/commands/run.dart b/packages/flutter_tools/lib/src/commands/run.dart index 9c8f64a11cb..e4a3908b9c8 100644 --- a/packages/flutter_tools/lib/src/commands/run.dart +++ b/packages/flutter_tools/lib/src/commands/run.dart @@ -38,7 +38,6 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment usesFlavorOption(); usesWebResourcesCdnFlag(); addNativeNullAssertions(hide: !verboseHelp); - addBundleSkSLPathOption(hide: !verboseHelp); usesApplicationBinaryOption(); argParser ..addFlag( @@ -61,20 +60,6 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment negatable: false, help: 'Include verbose logging from the Flutter engine.', ) - ..addFlag( - 'cache-sksl', - negatable: false, - help: 'Cache the shader in the SkSL format instead of in binary or GLSL formats.', - ) - ..addFlag( - 'dump-skp-on-shader-compilation', - negatable: false, - help: - 'Automatically dump the skp that triggers new shader compilations. ' - 'This is useful for writing custom ShaderWarmUp to reduce jank. ' - 'By default, this is not enabled as it introduces significant overhead. ' - 'This is only available in profile or debug builds.', - ) ..addFlag( 'purge-persistent-cache', negatable: false, @@ -240,8 +225,6 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment bool get traceStartup => boolArg('trace-startup'); bool get enableDartProfiling => boolArg('enable-dart-profiling'); - bool get cacheSkSL => boolArg('cache-sksl'); - bool get dumpSkpOnShaderCompilation => boolArg('dump-skp-on-shader-compilation'); bool get purgePersistentCache => boolArg('purge-persistent-cache'); bool get disableServiceAuthCodes => boolArg('disable-service-auth-codes'); bool get cacheStartupProfile => boolArg('cache-startup-profile'); @@ -344,8 +327,6 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment traceSystrace: boolArg('trace-systrace'), traceToFile: stringArg('trace-to-file'), endlessTraceBuffer: boolArg('endless-trace-buffer'), - dumpSkpOnShaderCompilation: dumpSkpOnShaderCompilation, - cacheSkSL: cacheSkSL, purgePersistentCache: purgePersistentCache, deviceVmServicePort: deviceVmservicePort, hostVmServicePort: hostVmservicePort, diff --git a/packages/flutter_tools/lib/src/custom_devices/custom_device.dart b/packages/flutter_tools/lib/src/custom_devices/custom_device.dart index d84ad6f37c8..b746f6d8b7f 100644 --- a/packages/flutter_tools/lib/src/custom_devices/custom_device.dart +++ b/packages/flutter_tools/lib/src/custom_devices/custom_device.dart @@ -291,8 +291,6 @@ class CustomDeviceAppSession { if (debuggingOptions.traceSystrace) 'trace-systrace=true', if (debuggingOptions.traceToFile != null) 'trace-to-file=${debuggingOptions.traceToFile}', if (debuggingOptions.endlessTraceBuffer) 'endless-trace-buffer=true', - if (debuggingOptions.dumpSkpOnShaderCompilation) 'dump-skp-on-shader-compilation=true', - if (debuggingOptions.cacheSkSL) 'cache-sksl=true', if (debuggingOptions.purgePersistentCache) 'purge-persistent-cache=true', if (debuggingOptions.debuggingEnabled) ...[ if (debuggingOptions.deviceVmServicePort != null) diff --git a/packages/flutter_tools/lib/src/desktop_device.dart b/packages/flutter_tools/lib/src/desktop_device.dart index cb0cadfee90..2d488395501 100644 --- a/packages/flutter_tools/lib/src/desktop_device.dart +++ b/packages/flutter_tools/lib/src/desktop_device.dart @@ -285,12 +285,6 @@ abstract class DesktopDevice extends Device { if (debuggingOptions.endlessTraceBuffer) { addFlag('endless-trace-buffer=true'); } - if (debuggingOptions.dumpSkpOnShaderCompilation) { - addFlag('dump-skp-on-shader-compilation=true'); - } - if (debuggingOptions.cacheSkSL) { - addFlag('cache-sksl=true'); - } if (debuggingOptions.purgePersistentCache) { addFlag('purge-persistent-cache=true'); } diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart index f36ae13ed19..1a37343b9b3 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart @@ -938,8 +938,6 @@ class DebuggingOptions { this.traceSystrace = false, this.traceToFile, this.endlessTraceBuffer = false, - this.dumpSkpOnShaderCompilation = false, - this.cacheSkSL = false, this.purgePersistentCache = false, this.useTestFonts = false, this.verboseSystemLogs = false, @@ -1001,7 +999,6 @@ class DebuggingOptions { this.webHeaders = const {}, WebRendererMode? webRenderer, this.webUseWasm = false, - this.cacheSkSL = false, this.traceAllowlist, this.enableImpeller = ImpellerStatus.platformDefault, this.enableVulkanValidation = false, @@ -1024,7 +1021,6 @@ class DebuggingOptions { traceSystrace = false, traceToFile = null, endlessTraceBuffer = false, - dumpSkpOnShaderCompilation = false, purgePersistentCache = false, verboseSystemLogs = false, hostVmServicePort = null, @@ -1061,8 +1057,6 @@ class DebuggingOptions { required this.traceSystrace, required this.traceToFile, required this.endlessTraceBuffer, - required this.dumpSkpOnShaderCompilation, - required this.cacheSkSL, required this.purgePersistentCache, required this.useTestFonts, required this.verboseSystemLogs, @@ -1122,8 +1116,6 @@ class DebuggingOptions { final bool traceSystrace; final String? traceToFile; final bool endlessTraceBuffer; - final bool dumpSkpOnShaderCompilation; - final bool cacheSkSL; final bool purgePersistentCache; final bool useTestFonts; final bool verboseSystemLogs; @@ -1231,9 +1223,7 @@ class DebuggingOptions { if (traceAllowlist != null) '--trace-allowlist="$traceAllowlist"', if (traceSkiaAllowlist != null) '--trace-skia-allowlist="$traceSkiaAllowlist"', if (endlessTraceBuffer) '--endless-trace-buffer', - if (dumpSkpOnShaderCompilation) '--dump-skp-on-shader-compilation', if (verboseSystemLogs) '--verbose-logging', - if (cacheSkSL) '--cache-sksl', if (purgePersistentCache) '--purge-persistent-cache', if (route != null) '--route=$route', if (platformArgs['trace-startup'] as bool? ?? false) '--trace-startup', @@ -1268,8 +1258,6 @@ class DebuggingOptions { 'traceSystrace': traceSystrace, 'traceToFile': traceToFile, 'endlessTraceBuffer': endlessTraceBuffer, - 'dumpSkpOnShaderCompilation': dumpSkpOnShaderCompilation, - 'cacheSkSL': cacheSkSL, 'purgePersistentCache': purgePersistentCache, 'useTestFonts': useTestFonts, 'verboseSystemLogs': verboseSystemLogs, @@ -1313,6 +1301,10 @@ class DebuggingOptions { // the flutter_tools binary that is currently checked into Google3. // Remove this when that binary has been updated. 'webUseLocalCanvaskit': false, + // See above: these fields are required for backwards compatibility + // with the google3 checked in binary. + 'dumpSkpOnShaderCompilation': false, + 'cacheSkSL': false, }; static DebuggingOptions fromJson(Map json, BuildInfo buildInfo) => @@ -1333,8 +1325,6 @@ class DebuggingOptions { traceSystrace: json['traceSystrace']! as bool, traceToFile: json['traceToFile'] as String?, endlessTraceBuffer: json['endlessTraceBuffer']! as bool, - dumpSkpOnShaderCompilation: json['dumpSkpOnShaderCompilation']! as bool, - cacheSkSL: json['cacheSkSL']! as bool, purgePersistentCache: json['purgePersistentCache']! as bool, useTestFonts: json['useTestFonts']! as bool, verboseSystemLogs: json['verboseSystemLogs']! as bool, diff --git a/packages/flutter_tools/lib/src/drive/drive_service.dart b/packages/flutter_tools/lib/src/drive/drive_service.dart index fce9f86fbae..b6c93db134b 100644 --- a/packages/flutter_tools/lib/src/drive/drive_service.dart +++ b/packages/flutter_tools/lib/src/drive/drive_service.dart @@ -18,7 +18,6 @@ import '../base/process.dart'; import '../build_info.dart'; import '../device.dart'; import '../resident_runner.dart'; -import '../sksl_writer.dart'; import '../vmservice.dart'; import 'web_driver_service.dart'; @@ -102,11 +101,7 @@ abstract class DriverService { }); /// Stop the running application and uninstall it from the device. - /// - /// If [writeSkslOnExit] is non-null, will connect to the VM Service - /// and write SkSL to the file. This is only supported on mobile and - /// desktop devices. - Future stop({File? writeSkslOnExit, String? userIdentifier}); + Future stop({String? userIdentifier}); } /// An implementation of the driver service that connects to mobile and desktop @@ -269,12 +264,7 @@ class FlutterDriverService extends DriverService { } @override - Future stop({File? writeSkslOnExit, String? userIdentifier}) async { - if (writeSkslOnExit != null) { - final FlutterView flutterView = (await _vmService.getFlutterViews()).first; - final Map? result = await _vmService.getSkSLs(viewId: flutterView.id); - await sharedSkSlWriter(_device!, result, outputFile: writeSkslOnExit, logger: _logger); - } + Future stop({String? userIdentifier}) async { // If the application package is available, stop and uninstall. final ApplicationPackage? package = _applicationPackage; if (package != null) { diff --git a/packages/flutter_tools/lib/src/drive/web_driver_service.dart b/packages/flutter_tools/lib/src/drive/web_driver_service.dart index 94d02bf4083..d12b349cd3f 100644 --- a/packages/flutter_tools/lib/src/drive/web_driver_service.dart +++ b/packages/flutter_tools/lib/src/drive/web_driver_service.dart @@ -207,7 +207,7 @@ class WebDriverService extends DriverService { } @override - Future stop({File? writeSkslOnExit, String? userIdentifier}) async { + Future stop({String? userIdentifier}) async { final bool appDidFinishPrematurely = _runResult != null; await _residentRunner.exitApp(); await _residentRunner.cleanupAtFinish(); diff --git a/packages/flutter_tools/lib/src/isolated/resident_web_runner.dart b/packages/flutter_tools/lib/src/isolated/resident_web_runner.dart index 0211eb31228..fb37901e483 100644 --- a/packages/flutter_tools/lib/src/isolated/resident_web_runner.dart +++ b/packages/flutter_tools/lib/src/isolated/resident_web_runner.dart @@ -140,9 +140,6 @@ class ResidentWebRunner extends ResidentRunner { /// WebServer device is debuggable when running with --start-paused. bool get deviceIsDebuggable => device!.device is! WebServerDevice || debuggingOptions.startPaused; - @override - bool get supportsWriteSkSL => false; - @override // Web uses a different plugin registry. bool get generateDartPluginRegistry => false; diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index 4c00216844e..aed8851f0fa 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart @@ -39,7 +39,6 @@ import 'project.dart'; import 'resident_devtools_handler.dart'; import 'run_cold.dart'; import 'run_hot.dart'; -import 'sksl_writer.dart'; import 'vmservice.dart'; import 'web/chrome.dart'; @@ -260,7 +259,6 @@ class FlutterDevice { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, required DebuggingOptions debuggingOptions, int? hostVmServicePort, @@ -336,7 +334,6 @@ class FlutterDevice { reloadSources: reloadSources, restart: restart, compileExpression: compileExpression, - getSkSLMethod: getSkSLMethod, flutterProject: FlutterProject.current(), printStructuredErrorLogMethod: printStructuredErrorLogMethod, device: device, @@ -629,9 +626,6 @@ abstract class ResidentHandlers { /// before enabling it. bool get supportsRestart; - /// Whether all of the connected devices support gathering SkSL. - bool get supportsWriteSkSL; - /// Whether all of the connected devices support hot reload. bool get canHotReload; @@ -892,21 +886,6 @@ abstract class ResidentHandlers { return true; } - /// Write the SkSL shaders to a zip file in build directory. - /// - /// Returns the name of the file, or `null` on failures. - Future writeSkSL() async { - if (!supportsWriteSkSL) { - throw Exception('writeSkSL is not supported by this runner.'); - } - final FlutterDevice flutterDevice = flutterDevices.first!; - final FlutterVmService vmService = flutterDevice.vmService!; - final List views = await vmService.getFlutterViews(); - final Map? data = await vmService.getSkSLs(viewId: views.first.id); - final Device device = flutterDevice.device!; - return sharedSkSlWriter(device, data); - } - /// Take a screenshot on the provided [device]. /// /// If the device has a connected vmservice, this method will attempt to hide @@ -1144,9 +1123,6 @@ abstract class ResidentRunner extends ResidentHandlers { @override bool get supportsServiceProtocol => isRunningDebug || isRunningProfile; - @override - bool get supportsWriteSkSL => supportsServiceProtocol; - bool get trackWidgetCreation => debuggingOptions.buildInfo.trackWidgetCreation; /// True if the shared Dart plugin registry (which is different than the one @@ -1345,7 +1321,6 @@ abstract class ResidentRunner extends ResidentHandlers { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, required bool allowExistingDdsInstance, }) async { if (!debuggingOptions.debuggingEnabled) { @@ -1361,7 +1336,6 @@ abstract class ResidentRunner extends ResidentHandlers { compileExpression: compileExpression, allowExistingDdsInstance: allowExistingDdsInstance, hostVmServicePort: debuggingOptions.hostVmServicePort, - getSkSLMethod: getSkSLMethod, printStructuredErrorLogMethod: printStructuredErrorLog, ); await device.vmService!.getFlutterViews(); @@ -1522,9 +1496,6 @@ abstract class ResidentRunner extends ResidentHandlers { // Performance related features: `P` should precede `a`, which should precede `M`. commandHelp.P.print(); commandHelp.a.print(); - if (supportsWriteSkSL) { - commandHelp.M.print(); - } if (isRunningDebug) { commandHelp.g.print(); } @@ -1722,12 +1693,6 @@ class TerminalHandler { case 'o': case 'O': return residentRunner.debugTogglePlatform(); - case 'M': - if (residentRunner.supportsWriteSkSL) { - await residentRunner.writeSkSL(); - return true; - } - return false; case 'p': return residentRunner.debugToggleDebugPaintSizeEnabled(); case 'P': diff --git a/packages/flutter_tools/lib/src/run_cold.dart b/packages/flutter_tools/lib/src/run_cold.dart index 55572904e8b..ecc4f6844be 100644 --- a/packages/flutter_tools/lib/src/run_cold.dart +++ b/packages/flutter_tools/lib/src/run_cold.dart @@ -144,10 +144,7 @@ class ColdRunner extends ResidentRunner { }) async { _didAttach = true; try { - await connectToServiceProtocol( - getSkSLMethod: writeSkSL, - allowExistingDdsInstance: allowExistingDdsInstance, - ); + await connectToServiceProtocol(allowExistingDdsInstance: allowExistingDdsInstance); } on Exception catch (error) { globals.printError('Error connecting to the service protocol: $error'); return 2; diff --git a/packages/flutter_tools/lib/src/run_hot.dart b/packages/flutter_tools/lib/src/run_hot.dart index 4926cdca0d6..1e2ef578ad4 100644 --- a/packages/flutter_tools/lib/src/run_hot.dart +++ b/packages/flutter_tools/lib/src/run_hot.dart @@ -253,7 +253,6 @@ class HotRunner extends ResidentRunner { reloadSources: _reloadSourcesService, restart: _restartService, compileExpression: _compileExpressionService, - getSkSLMethod: writeSkSL, allowExistingDdsInstance: allowExistingDdsInstance, ); // Catches all exceptions, non-Exception objects are rethrown. diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart index b2a12bd292c..6949b0f766e 100644 --- a/packages/flutter_tools/lib/src/runner/flutter_command.dart +++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart @@ -130,7 +130,6 @@ abstract final class FlutterOptions { static const String kDartObfuscationOption = 'obfuscate'; static const String kDartDefinesOption = 'dart-define'; static const String kDartDefineFromFileOption = 'dart-define-from-file'; - static const String kBundleSkSLPathOption = 'bundle-sksl-path'; static const String kPerformanceMeasurementFile = 'performance-measurement-file'; static const String kNullSafety = 'sound-null-safety'; static const String kDeviceUser = 'device-user'; @@ -938,18 +937,6 @@ abstract class FlutterCommand extends Command { ); } - void addBundleSkSLPathOption({required bool hide}) { - argParser.addOption( - FlutterOptions.kBundleSkSLPathOption, - help: - 'A path to a file containing precompiled SkSL shaders generated ' - 'during "flutter run". These can be included in an application to ' - 'improve the first frame render times.', - hide: hide, - valueHelp: 'flutter_1.sksl', - ); - } - void addTreeShakeIconsFlag({bool? enabledByDefault}) { argParser.addFlag( 'tree-shake-icons', @@ -1142,7 +1129,6 @@ abstract class FlutterCommand extends Command { void addCommonDesktopBuildOptions({required bool verboseHelp}) { addBuildModeFlags(verboseHelp: verboseHelp); addBuildPerformanceFile(hide: !verboseHelp); - addBundleSkSLPathOption(hide: !verboseHelp); addDartObfuscationOption(); addEnableExperimentation(hide: !verboseHelp); addNullSafetyModeOptions(hide: !verboseHelp); @@ -1417,15 +1403,6 @@ abstract class FlutterCommand extends Command { buildMode.isPrecompiled && boolArg('tree-shake-icons'); - final String? bundleSkSLPath = - argParser.options.containsKey(FlutterOptions.kBundleSkSLPathOption) - ? stringArg(FlutterOptions.kBundleSkSLPathOption) - : null; - - if (bundleSkSLPath != null && !globals.fs.isFileSync(bundleSkSLPath)) { - throwToolExit('No SkSL shader bundle found at $bundleSkSLPath.'); - } - final String? performanceMeasurementFile = argParser.options.containsKey(FlutterOptions.kPerformanceMeasurementFile) ? stringArg(FlutterOptions.kPerformanceMeasurementFile) @@ -1479,7 +1456,6 @@ abstract class FlutterCommand extends Command { splitDebugInfoPath: splitDebugInfoPath, dartObfuscation: dartObfuscation, dartDefines: dartDefines, - bundleSkSLPath: bundleSkSLPath, dartExperiments: experiments, performanceMeasurementFile: performanceMeasurementFile, packageConfigPath: packagesPath ?? packageConfigFile.path, diff --git a/packages/flutter_tools/lib/src/sksl_writer.dart b/packages/flutter_tools/lib/src/sksl_writer.dart deleted file mode 100644 index f839d1f5ebc..00000000000 --- a/packages/flutter_tools/lib/src/sksl_writer.dart +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2014 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'dart:async'; - -import 'package:file/file.dart'; - -import 'base/file_system.dart'; -import 'base/logger.dart'; -import 'build_info.dart'; -import 'convert.dart'; -import 'device.dart'; -import 'globals.dart' as globals; - -Future sharedSkSlWriter( - Device device, - Map? data, { - File? outputFile, - Logger? logger, -}) async { - logger ??= globals.logger; - if (data == null || data.isEmpty) { - logger.printStatus( - 'No data was received. To ensure SkSL data can be generated use a ' - 'physical device then:\n' - ' 1. Pass "--cache-sksl" as an argument to flutter run.\n' - ' 2. Interact with the application to force shaders to be compiled.\n', - ); - return null; - } - if (outputFile == null) { - outputFile = globals.fsUtils.getUniqueFile(globals.fs.currentDirectory, 'flutter', 'sksl.json'); - } else if (!outputFile.parent.existsSync()) { - outputFile.parent.createSync(recursive: true); - } - // Convert android sub-platforms to single target platform. - TargetPlatform targetPlatform = await device.targetPlatform; - switch (targetPlatform) { - case TargetPlatform.android_arm: - case TargetPlatform.android_arm64: - case TargetPlatform.android_x64: - case TargetPlatform.android_x86: - targetPlatform = TargetPlatform.android; - case TargetPlatform.android: - case TargetPlatform.darwin: - case TargetPlatform.ios: - case TargetPlatform.fuchsia_arm64: - case TargetPlatform.fuchsia_x64: - case TargetPlatform.linux_arm64: - case TargetPlatform.linux_x64: - case TargetPlatform.tester: - case TargetPlatform.web_javascript: - case TargetPlatform.windows_x64: - case TargetPlatform.windows_arm64: - break; - } - final Map manifest = { - 'platform': getNameForTargetPlatform(targetPlatform), - 'name': device.name, - 'engineRevision': globals.flutterVersion.engineRevision, - 'data': data, - }; - outputFile.writeAsStringSync(json.encode(manifest)); - logger.printStatus('Wrote SkSL data to ${outputFile.path}.'); - return outputFile.path; -} diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart index ee9997d8444..6add860df54 100644 --- a/packages/flutter_tools/lib/src/vmservice.dart +++ b/packages/flutter_tools/lib/src/vmservice.dart @@ -23,7 +23,6 @@ const String kResultType = 'type'; const String kResultTypeSuccess = 'Success'; const String kError = 'error'; -const String kGetSkSLsMethod = '_flutter.getSkSLs'; const String kSetAssetBundlePathMethod = '_flutter.setAssetBundlePath'; const String kFlushUIThreadTasksMethod = '_flutter.flushUIThreadTasks'; const String kRunInViewMethod = '_flutter.runInView'; @@ -38,7 +37,6 @@ const String kHotRestartServiceName = 'hotRestart'; const String kFlutterVersionServiceName = 'flutterVersion'; const String kCompileExpressionServiceName = 'compileExpression'; const String kFlutterMemoryInfoServiceName = 'flutterMemoryInfo'; -const String kFlutterGetSkSLServiceName = 'flutterGetSkSL'; /// The error response code from an unrecoverable compilation failure. const int kIsolateReloadBarred = 1005; @@ -94,11 +92,6 @@ typedef CompileExpression = bool isStatic, ); -/// A method that pulls an SkSL shader from the device and writes it to a file. -/// -/// The name of the file returned as a result. -typedef GetSkSLMethod = Future Function(); - Future _defaultOpenChannel( String url, { io.CompressionOptions compression = io.CompressionOptions.compressionDefault, @@ -169,7 +162,6 @@ typedef VMServiceConnector = ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions compression, @@ -186,7 +178,6 @@ Future setUpVmService({ Restart? restart, CompileExpression? compileExpression, Device? device, - GetSkSLMethod? skSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, required vm_service.VmService vmService, @@ -314,24 +305,6 @@ Future setUpVmService({ vmService.registerService(kFlutterMemoryInfoServiceName, kFlutterToolAlias), ); } - if (skSLMethod != null) { - vmService.registerServiceCallback(kFlutterGetSkSLServiceName, ( - Map params, - ) async { - final String? filename = await skSLMethod(); - if (filename == null) { - return { - 'result': {kResultType: kResultTypeSuccess}, - }; - } - return { - 'result': {kResultType: kResultTypeSuccess, 'filename': filename}, - }; - }); - registrationRequests.add( - vmService.registerService(kFlutterGetSkSLServiceName, kFlutterToolAlias), - ); - } if (printStructuredErrorLogMethod != null) { vmService.onExtensionEvent.listen(printStructuredErrorLogMethod); @@ -373,7 +346,6 @@ Future connectToVmService( ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions compression = io.CompressionOptions.compressionDefault, @@ -388,7 +360,6 @@ Future connectToVmService( compileExpression: compileExpression, compression: compression, device: device, - getSkSLMethod: getSkSLMethod, flutterProject: flutterProject, printStructuredErrorLogMethod: printStructuredErrorLogMethod, logger: logger, @@ -419,7 +390,6 @@ Future _connect( ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions compression = io.CompressionOptions.compressionDefault, @@ -438,7 +408,6 @@ Future _connect( restart: restart, compileExpression: compileExpression, device: device, - skSLMethod: getSkSLMethod, flutterProject: flutterProject, printStructuredErrorLogMethod: printStructuredErrorLogMethod, vmService: delegateService, @@ -562,21 +531,6 @@ class FlutterVmService { ); } - /// Retrieve the cached SkSL shaders from an attached Flutter view. - /// - /// This method will only return data if `--cache-sksl` was provided as a - /// flutter run argument, and only then on physical devices. - Future?> getSkSLs({required String viewId}) async { - final vm_service.Response? response = await callMethodWrapper( - kGetSkSLsMethod, - args: {'viewId': viewId}, - ); - if (response == null) { - return null; - } - return response.json?['SkSLs'] as Map?; - } - /// Flush all tasks on the UI thread for an attached Flutter view. /// /// This method is currently used only for benchmarking. diff --git a/packages/flutter_tools/test/commands.shard/hermetic/build_linux_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/build_linux_test.dart index 6e229a70c89..3fe5dbe2399 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/build_linux_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/build_linux_test.dart @@ -616,7 +616,6 @@ ERROR: No file or variants found for asset: images/a_dot_burr.jpeg setUpMockProjectFilesForBuild(); processManager.addCommands([cmakeCommand('release'), ninjaCommand('release')]); fileSystem.file('lib/other.dart').createSync(recursive: true); - fileSystem.file('foo/bar.sksl.json').createSync(recursive: true); await createTestCommandRunner(command).run(const [ 'build', @@ -630,7 +629,6 @@ ERROR: No file or variants found for asset: images/a_dot_burr.jpeg '--dart-define=foo.bar=2', '--dart-define=fizz.far=3', '--tree-shake-icons', - '--bundle-sksl-path=foo/bar.sksl.json', ]); final File cmakeConfig = fileSystem.currentDirectory @@ -663,7 +661,6 @@ ERROR: No file or variants found for asset: images/a_dot_burr.jpeg ' "FLUTTER_ROOT=$_kTestFlutterRoot"', ' "PROJECT_DIR=${fileSystem.currentDirectory.path}"', ' "FLUTTER_TARGET=lib/other.dart"', - ' "BUNDLE_SKSL_PATH=foo/bar.sksl.json"', ]), ); }, diff --git a/packages/flutter_tools/test/commands.shard/hermetic/build_macos_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/build_macos_test.dart index fc7a8cde8b9..c2438b690c9 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/build_macos_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/build_macos_test.dart @@ -460,7 +460,6 @@ STDERR STUFF ); createMinimalMockProjectFiles(); fileSystem.file('lib/other.dart').createSync(recursive: true); - fileSystem.file('foo/bar.sksl.json').createSync(recursive: true); await createTestCommandRunner(command).run(const [ 'build', @@ -474,7 +473,6 @@ STDERR STUFF '--dart-define=foo.bar=2', '--dart-define=fizz.far=3', '--tree-shake-icons', - '--bundle-sksl-path=foo/bar.sksl.json', ]); final List contents = fileSystem.file('./macos/Flutter/ephemeral/Flutter-Generated.xcconfig').readAsLinesSync(); @@ -494,7 +492,6 @@ STDERR STUFF 'SPLIT_DEBUG_INFO=foo/', 'TRACK_WIDGET_CREATION=true', 'TREE_SHAKE_ICONS=true', - 'BUNDLE_SKSL_PATH=foo/bar.sksl.json', 'PACKAGE_CONFIG=/.dart_tool/package_config.json', 'COCOAPODS_PARALLEL_CODE_SIGN=true', ]), diff --git a/packages/flutter_tools/test/commands.shard/hermetic/build_windows_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/build_windows_test.dart index 5b8a7b35617..7066a8e42e5 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/build_windows_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/build_windows_test.dart @@ -390,7 +390,6 @@ C:\foo\windows\x64\runner\main.cpp(17,1): error C2065: 'Baz': undeclared identif buildCommand('Release'), ]); fileSystem.file(fileSystem.path.join('lib', 'other.dart')).createSync(recursive: true); - fileSystem.file(fileSystem.path.join('foo', 'bar.sksl.json')).createSync(recursive: true); // Relevant portions of an incorrectly generated project, with some // irrelevant details removed for length. @@ -533,7 +532,6 @@ if %errorlevel% neq 0 goto :VCEnd buildCommand('Release'), ]); fileSystem.file(fileSystem.path.join('lib', 'other.dart')).createSync(recursive: true); - fileSystem.file(fileSystem.path.join('foo', 'bar.sksl.json')).createSync(recursive: true); await createTestCommandRunner(command).run(const [ 'windows', @@ -545,7 +543,6 @@ if %errorlevel% neq 0 goto :VCEnd r'--split-debug-info=C:\foo\', '--dart-define=foo=a', '--dart-define=bar=b', - r'--bundle-sksl-path=foo\bar.sksl.json', r'--target=lib\other.dart', ]); @@ -581,7 +578,6 @@ if %errorlevel% neq 0 goto :VCEnd r' "FLUTTER_ROOT=C:\\flutter"', r' "PROJECT_DIR=C:\\"', r' "FLUTTER_TARGET=lib\\other.dart"', - r' "BUNDLE_SKSL_PATH=foo\\bar.sksl.json"', ]), ); }, diff --git a/packages/flutter_tools/test/commands.shard/hermetic/run_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/run_test.dart index 7fe5d264e69..f7fed002274 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/run_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/run_test.dart @@ -1309,25 +1309,6 @@ void main() { }, ); - testUsingContext( - 'Passes sksl bundle info the build options', - () async { - final TestRunCommandWithFakeResidentRunner command = TestRunCommandWithFakeResidentRunner(); - - await expectLater( - () => createTestCommandRunner( - command, - ).run(['run', '--no-pub', '--bundle-sksl-path=foo.json']), - throwsToolExit(message: 'No SkSL shader bundle found at foo.json'), - ); - }, - overrides: { - Cache: () => Cache.test(processManager: FakeProcessManager.any()), - FileSystem: () => MemoryFileSystem.test(), - ProcessManager: () => FakeProcessManager.any(), - }, - ); - testUsingContext( 'Configures web connection options to use web sockets by default', () async { diff --git a/packages/flutter_tools/test/general.shard/android/android_device_start_test.dart b/packages/flutter_tools/test/general.shard/android/android_device_start_test.dart index 690e6dd1fb9..26984820448 100644 --- a/packages/flutter_tools/test/general.shard/android/android_device_start_test.dart +++ b/packages/flutter_tools/test/general.shard/android/android_device_start_test.dart @@ -256,8 +256,6 @@ void main() { '--ez', 'trace-systrace', 'true', '--es', 'trace-to-file', 'path/to/trace.binpb', '--ez', 'endless-trace-buffer', 'true', - '--ez', 'dump-skp-on-shader-compilation', 'true', - '--ez', 'cache-sksl', 'true', '--ez', 'purge-persistent-cache', 'true', '--ez', 'enable-impeller', 'true', '--ez', 'enable-checked-mode', 'true', @@ -289,8 +287,6 @@ void main() { traceSystrace: true, traceToFile: 'path/to/trace.binpb', endlessTraceBuffer: true, - dumpSkpOnShaderCompilation: true, - cacheSkSL: true, purgePersistentCache: true, useTestFonts: true, verboseSystemLogs: true, diff --git a/packages/flutter_tools/test/general.shard/base/command_help_test.dart b/packages/flutter_tools/test/general.shard/base/command_help_test.dart index 957af4e9bc9..6b4998f6291 100644 --- a/packages/flutter_tools/test/general.shard/base/command_help_test.dart +++ b/packages/flutter_tools/test/general.shard/base/command_help_test.dart @@ -40,7 +40,6 @@ void _testMessageLength({ expect(commandHelp.I.toString().length, lessThanOrEqualTo(expectedWidth)); expect(commandHelp.L.toString().length, lessThanOrEqualTo(expectedWidth)); - expect(commandHelp.M.toString().length, lessThanOrEqualTo(expectedWidth)); expect(commandHelp.P.toString().length, lessThanOrEqualTo(expectedWidth)); expect(commandHelp.R.toString().length, lessThanOrEqualTo(expectedWidth)); expect(commandHelp.S.toString().length, lessThanOrEqualTo(expectedWidth)); @@ -89,7 +88,6 @@ void main() { expect(commandHelp.I.toString(), startsWith('\x1B[1mI\x1B[22m')); expect(commandHelp.L.toString(), startsWith('\x1B[1mL\x1B[22m')); - expect(commandHelp.M.toString(), startsWith('\x1B[1mM\x1B[22m')); expect(commandHelp.P.toString(), startsWith('\x1B[1mP\x1B[22m')); expect(commandHelp.R.toString(), startsWith('\x1B[1mR\x1B[22m')); expect(commandHelp.S.toString(), startsWith('\x1B[1mS\x1B[22m')); @@ -196,10 +194,6 @@ void main() { '\x1B[1mL\x1B[22m Dump layer tree to the console. \x1B[90m(debugDumpLayerTree)\x1B[39m\x1B[22m', ), ); - expect( - commandHelp.M.toString(), - equals('\x1B[1mM\x1B[22m Write SkSL shaders to a unique file in the project directory.'), - ); expect( commandHelp.P.toString(), equals( @@ -304,10 +298,6 @@ void main() { 'I Toggle oversized image inversion. (debugInvertOversizedImages)', ), ); - expect( - commandHelp.M.toString(), - equals('M Write SkSL shaders to a unique file in the project directory.'), - ); expect( commandHelp.L.toString(), equals( diff --git a/packages/flutter_tools/test/general.shard/build_info_test.dart b/packages/flutter_tools/test/general.shard/build_info_test.dart index 9e6e6b71108..5ab425a7858 100644 --- a/packages/flutter_tools/test/general.shard/build_info_test.dart +++ b/packages/flutter_tools/test/general.shard/build_info_test.dart @@ -232,7 +232,6 @@ void main() { frontendServerStarterPath: 'foo/bar/frontend_server_starter.dart', extraFrontEndOptions: ['--enable-experiment=non-nullable', 'bar'], extraGenSnapshotOptions: ['--enable-experiment=non-nullable', 'fizz'], - bundleSkSLPath: 'foo/bar/baz.sksl.json', packageConfigPath: 'foo/.dart_tool/package_config.json', codeSizeDirectory: 'foo/code-size', fileSystemRoots: ['test5', 'test6'], @@ -251,7 +250,6 @@ void main() { 'SplitDebugInfo': 'foo/', 'TrackWidgetCreation': 'true', 'TreeShakeIcons': 'true', - 'BundleSkSLPath': 'foo/bar/baz.sksl.json', 'CodeSizeDirectory': 'foo/code-size', 'FileSystemRoots': 'test5,test6', 'FileSystemScheme': 'scheme', @@ -272,7 +270,6 @@ void main() { frontendServerStarterPath: 'foo/bar/frontend_server_starter.dart', extraFrontEndOptions: ['--enable-experiment=non-nullable', 'bar'], extraGenSnapshotOptions: ['--enable-experiment=non-nullable', 'fizz'], - bundleSkSLPath: 'foo/bar/baz.sksl.json', packageConfigPath: 'foo/.dart_tool/package_config.json', codeSizeDirectory: 'foo/code-size', // These values are ignored by toEnvironmentConfig @@ -288,7 +285,6 @@ void main() { 'FRONTEND_SERVER_STARTER_PATH': 'foo/bar/frontend_server_starter.dart', 'EXTRA_FRONT_END_OPTIONS': '--enable-experiment=non-nullable,bar', 'EXTRA_GEN_SNAPSHOT_OPTIONS': '--enable-experiment=non-nullable,fizz', - 'BUNDLE_SKSL_PATH': 'foo/bar/baz.sksl.json', 'PACKAGE_CONFIG': 'foo/.dart_tool/package_config.json', 'CODE_SIZE_DIRECTORY': 'foo/code-size', 'FLAVOR': 'strawberry', @@ -307,7 +303,6 @@ void main() { frontendServerStarterPath: 'foo/bar/frontend_server_starter.dart', extraFrontEndOptions: ['--enable-experiment=non-nullable', 'bar'], extraGenSnapshotOptions: ['--enable-experiment=non-nullable', 'fizz'], - bundleSkSLPath: 'foo/bar/baz.sksl.json', packageConfigPath: 'foo/.dart_tool/package_config.json', codeSizeDirectory: 'foo/code-size', androidProjectArgs: ['foo=bar', 'fizz=bazz'], @@ -322,7 +317,6 @@ void main() { '-Psplit-debug-info=foo/', '-Ptrack-widget-creation=true', '-Ptree-shake-icons=true', - '-Pbundle-sksl-path=foo/bar/baz.sksl.json', '-Pcode-size-directory=foo/code-size', '-Pfoo=bar', '-Pfizz=bazz', diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/android_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/android_test.dart index fd8de60200b..1eca6d2a53c 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/android_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/android_test.dart @@ -12,7 +12,6 @@ import 'package:flutter_tools/src/build_info.dart'; import 'package:flutter_tools/src/build_system/build_system.dart'; import 'package:flutter_tools/src/build_system/depfile.dart'; import 'package:flutter_tools/src/build_system/targets/android.dart'; -import 'package:flutter_tools/src/convert.dart'; import '../../../src/common.dart'; import '../../../src/context.dart'; @@ -84,7 +83,6 @@ void main() { fileSystem.currentDirectory, outputDir: fileSystem.directory('out')..createSync(), defines: {kBuildMode: 'debug'}, - inputs: {kBundleSkSLPath: 'bundle.sksl'}, processManager: processManager, artifacts: artifacts, fileSystem: fileSystem, @@ -92,15 +90,6 @@ void main() { engineVersion: '2', ); environment.buildDir.createSync(recursive: true); - fileSystem - .file('bundle.sksl') - .writeAsStringSync( - json.encode({ - 'engineRevision': '2', - 'platform': 'android', - 'data': {'A': 'B'}, - }), - ); // create pre-requisites. environment.buildDir.childFile('app.dill').writeAsStringSync('abcd'); @@ -126,10 +115,6 @@ void main() { fileSystem.file(fileSystem.path.join('out', 'flutter_assets', 'kernel_blob.bin')), exists, ); - expect( - fileSystem.file(fileSystem.path.join('out', 'flutter_assets', 'io.flutter.shaders.json')), - exists, - ); }); testWithoutContext('profile bundle contains expected resources', () async { diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/assets_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/assets_test.dart index 65c2a18e718..968cd883f19 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/assets_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/assets_test.dart @@ -16,8 +16,6 @@ import 'package:flutter_tools/src/build_system/build_system.dart'; import 'package:flutter_tools/src/build_system/depfile.dart'; import 'package:flutter_tools/src/build_system/targets/assets.dart'; import 'package:flutter_tools/src/cache.dart'; -import 'package:flutter_tools/src/convert.dart'; -import 'package:flutter_tools/src/devfs.dart'; import 'package:flutter_tools/src/globals.dart' as globals; import '../../../src/common.dart'; @@ -501,140 +499,4 @@ flutter: ProcessManager: () => FakeProcessManager.any(), }, ); - - testWithoutContext('processSkSLBundle returns null if there is no path ' - 'to the bundle', () { - expect( - processSkSLBundle( - null, - targetPlatform: TargetPlatform.android, - fileSystem: MemoryFileSystem.test(), - logger: logger, - ), - isNull, - ); - }); - - testWithoutContext('processSkSLBundle throws exception if bundle file is ' - 'missing', () { - expect( - () => processSkSLBundle( - 'does_not_exist.sksl', - targetPlatform: TargetPlatform.android, - fileSystem: MemoryFileSystem.test(), - logger: logger, - ), - throwsException, - ); - }); - - testWithoutContext('processSkSLBundle throws exception if the bundle is not ' - 'valid JSON', () { - final FileSystem fileSystem = MemoryFileSystem.test(); - final BufferLogger logger = BufferLogger.test(); - fileSystem.file('bundle.sksl').writeAsStringSync('{'); - - expect( - () => processSkSLBundle( - 'bundle.sksl', - targetPlatform: TargetPlatform.android, - fileSystem: fileSystem, - logger: logger, - ), - throwsException, - ); - expect(logger.errorText, contains('was not a JSON object')); - }); - - testWithoutContext('processSkSLBundle throws exception if the bundle is not ' - 'a JSON object', () { - final FileSystem fileSystem = MemoryFileSystem.test(); - final BufferLogger logger = BufferLogger.test(); - fileSystem.file('bundle.sksl').writeAsStringSync('[]'); - - expect( - () => processSkSLBundle( - 'bundle.sksl', - targetPlatform: TargetPlatform.android, - fileSystem: fileSystem, - logger: logger, - ), - throwsException, - ); - expect(logger.errorText, contains('was not a JSON object')); - }); - - testWithoutContext('processSkSLBundle throws an exception if the engine ' - 'revision is different', () { - final FileSystem fileSystem = MemoryFileSystem.test(); - final BufferLogger logger = BufferLogger.test(); - fileSystem - .file('bundle.sksl') - .writeAsStringSync(json.encode({'engineRevision': '1'})); - - expect( - () => processSkSLBundle( - 'bundle.sksl', - targetPlatform: TargetPlatform.android, - fileSystem: fileSystem, - logger: logger, - engineVersion: '2', - ), - throwsException, - ); - expect(logger.errorText, contains('Expected Flutter 1, but found 2')); - }); - - testWithoutContext('processSkSLBundle warns if the bundle target platform is ' - 'different from the current target', () async { - final FileSystem fileSystem = MemoryFileSystem.test(); - final BufferLogger logger = BufferLogger.test(); - fileSystem - .file('bundle.sksl') - .writeAsStringSync( - json.encode({ - 'engineRevision': '2', - 'platform': 'fuchsia-arm64', - 'data': {}, - }), - ); - - final DevFSContent content = - processSkSLBundle( - 'bundle.sksl', - targetPlatform: TargetPlatform.android, - fileSystem: fileSystem, - logger: logger, - engineVersion: '2', - )!; - - expect(await content.contentsAsBytes(), utf8.encode('{"data":{}}')); - expect(logger.errorText, contains('This may lead to less efficient shader caching')); - }); - - testWithoutContext('processSkSLBundle does not warn and produces bundle', () async { - final FileSystem fileSystem = MemoryFileSystem.test(); - final BufferLogger logger = BufferLogger.test(); - fileSystem - .file('bundle.sksl') - .writeAsStringSync( - json.encode({ - 'engineRevision': '2', - 'platform': 'android', - 'data': {}, - }), - ); - - final DevFSContent content = - processSkSLBundle( - 'bundle.sksl', - targetPlatform: TargetPlatform.android, - fileSystem: fileSystem, - logger: logger, - engineVersion: '2', - )!; - - expect(await content.contentsAsBytes(), utf8.encode('{"data":{}}')); - expect(logger.errorText, isEmpty); - }); } diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart index 658e7ccea9a..296b3a3fb3c 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart @@ -11,7 +11,6 @@ import 'package:flutter_tools/src/base/platform.dart'; import 'package:flutter_tools/src/build_info.dart'; import 'package:flutter_tools/src/build_system/build_system.dart'; import 'package:flutter_tools/src/build_system/targets/ios.dart'; -import 'package:flutter_tools/src/convert.dart'; import 'package:flutter_tools/src/reporting/reporting.dart'; import 'package:unified_analytics/unified_analytics.dart'; @@ -196,7 +195,6 @@ void main() { testUsingContext( 'DebugIosApplicationBundle', () async { - environment.defines[kBundleSkSLPath] = 'bundle.sksl'; environment.defines[kBuildMode] = 'debug'; environment.defines[kCodesignIdentity] = 'ABC123'; // Precompiled dart data @@ -225,16 +223,6 @@ void main() { .childDirectory('App.framework') .childFile('App') .createSync(recursive: true); - // sksl bundle - fileSystem - .file('bundle.sksl') - .writeAsStringSync( - json.encode({ - 'engineRevision': '2', - 'platform': 'ios', - 'data': {'A': 'B'}, - }), - ); final Directory frameworkDirectory = environment.outputDir.childDirectory('App.framework'); final File frameworkDirectoryBinary = frameworkDirectory.childFile('App'); @@ -271,11 +259,6 @@ void main() { expect(assetDirectory.childFile('AssetManifest.json'), exists); expect(assetDirectory.childFile('vm_snapshot_data'), exists); expect(assetDirectory.childFile('isolate_snapshot_data'), exists); - expect(assetDirectory.childFile('io.flutter.shaders.json'), exists); - expect( - assetDirectory.childFile('io.flutter.shaders.json').readAsStringSync(), - '{"data":{"A":"B"}}', - ); }, overrides: { FileSystem: () => fileSystem, diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/linux_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/linux_test.dart index 17bcf8e5ab3..2f20cf53307 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/linux_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/linux_test.dart @@ -11,7 +11,6 @@ import 'package:flutter_tools/src/build_info.dart'; import 'package:flutter_tools/src/build_system/build_system.dart'; import 'package:flutter_tools/src/build_system/targets/common.dart'; import 'package:flutter_tools/src/build_system/targets/linux.dart'; -import 'package:flutter_tools/src/convert.dart'; import '../../../src/common.dart'; import '../../../src/context.dart'; @@ -130,7 +129,6 @@ void main() { final Environment testEnvironment = Environment.test( fileSystem.currentDirectory, defines: {kBuildMode: 'debug', kBuildName: '2.0.0', kBuildNumber: '22'}, - inputs: {kBundleSkSLPath: 'bundle.sksl'}, artifacts: Artifacts.test(), processManager: FakeProcessManager.any(), fileSystem: fileSystem, @@ -143,15 +141,6 @@ void main() { // Create input files. testEnvironment.buildDir.childFile('app.dill').createSync(); testEnvironment.buildDir.childFile('native_assets.json').createSync(); - fileSystem - .file('bundle.sksl') - .writeAsStringSync( - json.encode({ - 'engineRevision': '2', - 'platform': 'ios', - 'data': {'A': 'B'}, - }), - ); await const DebugBundleLinuxAssets(TargetPlatform.linux_x64).build(testEnvironment); @@ -163,9 +152,6 @@ void main() { final String versionFile = output.childFile('version.json').readAsStringSync(); expect(versionFile, contains('"version":"2.0.0"')); expect(versionFile, contains('"build_number":"22"')); - // SkSL - expect(output.childFile('io.flutter.shaders.json'), exists); - expect(output.childFile('io.flutter.shaders.json').readAsStringSync(), '{"data":{"A":"B"}}'); // No bundled fonts expect(output.childFile('FontManifest.json'), isNot(exists)); diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/macos_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/macos_test.dart index 979a118b76d..9e448e26ed9 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/macos_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/macos_test.dart @@ -10,7 +10,6 @@ import 'package:flutter_tools/src/base/logger.dart'; import 'package:flutter_tools/src/build_info.dart'; import 'package:flutter_tools/src/build_system/build_system.dart'; import 'package:flutter_tools/src/build_system/targets/macos.dart'; -import 'package:flutter_tools/src/convert.dart'; import 'package:unified_analytics/unified_analytics.dart'; import '../../../src/common.dart'; @@ -413,7 +412,6 @@ void main() { artifacts.getArtifactPath(Artifact.flutterMacOSFramework, mode: BuildMode.debug), ) .createSync(); - environment.defines[kBundleSkSLPath] = 'bundle.sksl'; fileSystem .file( artifacts.getArtifactPath( @@ -433,16 +431,6 @@ void main() { ) .createSync(recursive: true); fileSystem.file('${environment.buildDir.path}/App.framework/App').createSync(recursive: true); - // sksl bundle - fileSystem - .file('bundle.sksl') - .writeAsStringSync( - json.encode({ - 'engineRevision': '2', - 'platform': 'ios', - 'data': {'A': 'B'}, - }), - ); final String inputKernel = '${environment.buildDir.path}/app.dill'; fileSystem.file(inputKernel) @@ -470,13 +458,6 @@ void main() { fileSystem.file('App.framework/Versions/A/Resources/flutter_assets/isolate_snapshot_data'), exists, ); - - final File skslFile = fileSystem.file( - 'App.framework/Versions/A/Resources/flutter_assets/io.flutter.shaders.json', - ); - - expect(skslFile, exists); - expect(skslFile.readAsStringSync(), '{"data":{"A":"B"}}'); }, overrides: { FileSystem: () => fileSystem, diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/windows_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/windows_test.dart index c23e073ab7d..dd2433103f4 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/windows_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/windows_test.dart @@ -11,7 +11,6 @@ import 'package:flutter_tools/src/build_info.dart'; import 'package:flutter_tools/src/build_system/build_system.dart'; import 'package:flutter_tools/src/build_system/targets/common.dart'; import 'package:flutter_tools/src/build_system/targets/windows.dart'; -import 'package:flutter_tools/src/convert.dart'; import '../../../src/common.dart'; import '../../../src/context.dart'; @@ -157,22 +156,11 @@ void main() { fileSystem: fileSystem, logger: BufferLogger.test(), defines: {kBuildMode: 'debug'}, - inputs: {kBundleSkSLPath: 'bundle.sksl'}, engineVersion: '2', ); environment.buildDir.childFile('app.dill').createSync(recursive: true); environment.buildDir.childFile('native_assets.json').createSync(recursive: true); - // sksl bundle - fileSystem - .file('bundle.sksl') - .writeAsStringSync( - json.encode({ - 'engineRevision': '2', - 'platform': 'ios', - 'data': {'A': 'B'}, - }), - ); await const DebugBundleWindowsAssets(TargetPlatform.windows_x64).build(environment); @@ -180,11 +168,6 @@ void main() { expect(environment.buildDir.childFile('flutter_assets.d'), exists); expect(fileSystem.file(r'C:\flutter_assets\kernel_blob.bin'), exists); expect(fileSystem.file(r'C:\flutter_assets\AssetManifest.json'), exists); - expect(fileSystem.file(r'C:\flutter_assets\io.flutter.shaders.json'), exists); - expect( - fileSystem.file(r'C:\flutter_assets\io.flutter.shaders.json').readAsStringSync(), - '{"data":{"A":"B"}}', - ); }, overrides: { FileSystem: () => fileSystem, diff --git a/packages/flutter_tools/test/general.shard/cold_test.dart b/packages/flutter_tools/test/general.shard/cold_test.dart index 0b0b75c9d9f..24e5c8cb866 100644 --- a/packages/flutter_tools/test/general.shard/cold_test.dart +++ b/packages/flutter_tools/test/general.shard/cold_test.dart @@ -243,7 +243,6 @@ class TestFlutterDevice extends FlutterDevice { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, required DebuggingOptions debuggingOptions, diff --git a/packages/flutter_tools/test/general.shard/desktop_device_test.dart b/packages/flutter_tools/test/general.shard/desktop_device_test.dart index 1643762102e..610cf354f97 100644 --- a/packages/flutter_tools/test/general.shard/desktop_device_test.dart +++ b/packages/flutter_tools/test/general.shard/desktop_device_test.dart @@ -166,18 +166,16 @@ void main() { 'FLUTTER_ENGINE_SWITCH_8': 'trace-systrace=true', 'FLUTTER_ENGINE_SWITCH_9': 'trace-to-file=path/to/trace.binpb', 'FLUTTER_ENGINE_SWITCH_10': 'endless-trace-buffer=true', - 'FLUTTER_ENGINE_SWITCH_11': 'dump-skp-on-shader-compilation=true', - 'FLUTTER_ENGINE_SWITCH_12': 'cache-sksl=true', - 'FLUTTER_ENGINE_SWITCH_13': 'purge-persistent-cache=true', - 'FLUTTER_ENGINE_SWITCH_14': 'enable-impeller=false', - 'FLUTTER_ENGINE_SWITCH_15': 'enable-checked-mode=true', - 'FLUTTER_ENGINE_SWITCH_16': 'verify-entry-points=true', - 'FLUTTER_ENGINE_SWITCH_17': 'start-paused=true', - 'FLUTTER_ENGINE_SWITCH_18': 'disable-service-auth-codes=true', - 'FLUTTER_ENGINE_SWITCH_19': 'dart-flags=--null_assertions', - 'FLUTTER_ENGINE_SWITCH_20': 'use-test-fonts=true', - 'FLUTTER_ENGINE_SWITCH_21': 'verbose-logging=true', - 'FLUTTER_ENGINE_SWITCHES': '21', + 'FLUTTER_ENGINE_SWITCH_11': 'purge-persistent-cache=true', + 'FLUTTER_ENGINE_SWITCH_12': 'enable-impeller=false', + 'FLUTTER_ENGINE_SWITCH_13': 'enable-checked-mode=true', + 'FLUTTER_ENGINE_SWITCH_14': 'verify-entry-points=true', + 'FLUTTER_ENGINE_SWITCH_15': 'start-paused=true', + 'FLUTTER_ENGINE_SWITCH_16': 'disable-service-auth-codes=true', + 'FLUTTER_ENGINE_SWITCH_17': 'dart-flags=--null_assertions', + 'FLUTTER_ENGINE_SWITCH_18': 'use-test-fonts=true', + 'FLUTTER_ENGINE_SWITCH_19': 'verbose-logging=true', + 'FLUTTER_ENGINE_SWITCHES': '19', }, ), ]); @@ -199,8 +197,6 @@ void main() { traceSystrace: true, traceToFile: 'path/to/trace.binpb', endlessTraceBuffer: true, - dumpSkpOnShaderCompilation: true, - cacheSkSL: true, purgePersistentCache: true, useTestFonts: true, verboseSystemLogs: true, @@ -225,9 +221,8 @@ void main() { 'FLUTTER_ENGINE_SWITCH_1': 'enable-dart-profiling=true', 'FLUTTER_ENGINE_SWITCH_2': 'trace-startup=true', 'FLUTTER_ENGINE_SWITCH_3': 'trace-allowlist=foo,bar', - 'FLUTTER_ENGINE_SWITCH_4': 'cache-sksl=true', - 'FLUTTER_ENGINE_SWITCH_5': 'enable-impeller=false', - 'FLUTTER_ENGINE_SWITCHES': '5', + 'FLUTTER_ENGINE_SWITCH_4': 'enable-impeller=false', + 'FLUTTER_ENGINE_SWITCHES': '4', }, ), ]); @@ -237,11 +232,7 @@ void main() { package, prebuiltApplication: true, platformArgs: {'trace-startup': true}, - debuggingOptions: DebuggingOptions.disabled( - BuildInfo.debug, - traceAllowlist: 'foo,bar', - cacheSkSL: true, - ), + debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug, traceAllowlist: 'foo,bar'), ); expect(result.started, true); diff --git a/packages/flutter_tools/test/general.shard/device_test.dart b/packages/flutter_tools/test/general.shard/device_test.dart index 4a89b6ccd11..c39f4dd3cc3 100644 --- a/packages/flutter_tools/test/general.shard/device_test.dart +++ b/packages/flutter_tools/test/general.shard/device_test.dart @@ -761,8 +761,6 @@ void main() { traceSystrace: true, traceToFile: 'path/to/trace.binpb', endlessTraceBuffer: true, - dumpSkpOnShaderCompilation: true, - cacheSkSL: true, purgePersistentCache: true, verboseSystemLogs: true, enableImpeller: ImpellerStatus.disabled, @@ -796,9 +794,7 @@ void main() { '--trace-allowlist="foo"', '--trace-skia-allowlist="skia.a,skia.b"', '--endless-trace-buffer', - '--dump-skp-on-shader-compilation', '--verbose-logging', - '--cache-sksl', '--purge-persistent-cache', '--route=/test', '--trace-startup', @@ -895,7 +891,6 @@ void main() { final DebuggingOptions original = DebuggingOptions.disabled( BuildInfo.debug, traceAllowlist: 'foo', - cacheSkSL: true, enableImpeller: ImpellerStatus.disabled, ); @@ -910,7 +905,6 @@ void main() { [ '--enable-dart-profiling', '--trace-allowlist="foo"', - '--cache-sksl', '--route=/test', '--trace-startup', '--enable-impeller=false', @@ -937,8 +931,6 @@ void main() { traceSystrace: true, traceToFile: 'path/to/trace.binpb', endlessTraceBuffer: true, - dumpSkpOnShaderCompilation: true, - cacheSkSL: true, purgePersistentCache: true, verboseSystemLogs: true, enableImpeller: ImpellerStatus.disabled, @@ -972,9 +964,7 @@ void main() { '--trace-allowlist="foo"', '--trace-skia-allowlist="skia.a,skia.b"', '--endless-trace-buffer', - '--dump-skp-on-shader-compilation', '--verbose-logging', - '--cache-sksl', '--purge-persistent-cache', '--route=/test', '--trace-startup', diff --git a/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart b/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart index c2e5cb5e07f..5a26b621dbe 100644 --- a/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart +++ b/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart @@ -5,7 +5,6 @@ import 'dart:async'; import 'package:file/file.dart'; -import 'package:file/memory.dart'; import 'package:flutter_tools/src/application_package.dart'; import 'package:flutter_tools/src/base/dds.dart'; import 'package:flutter_tools/src/base/io.dart' as io; @@ -13,12 +12,10 @@ import 'package:flutter_tools/src/base/logger.dart'; import 'package:flutter_tools/src/base/platform.dart'; import 'package:flutter_tools/src/base/process.dart'; import 'package:flutter_tools/src/build_info.dart'; -import 'package:flutter_tools/src/convert.dart'; import 'package:flutter_tools/src/device.dart'; import 'package:flutter_tools/src/drive/drive_service.dart'; import 'package:flutter_tools/src/project.dart'; import 'package:flutter_tools/src/resident_runner.dart'; -import 'package:flutter_tools/src/version.dart'; import 'package:flutter_tools/src/vmservice.dart'; import 'package:package_config/package_config_types.dart'; import 'package:test/fake.dart'; @@ -61,15 +58,6 @@ final vm_service.VM fakeVM = vm_service.VM( systemIsolates: [], ); -final FlutterView fakeFlutterView = FlutterView(id: 'a', uiIsolate: fakeUnpausedIsolate); - -final FakeVmServiceRequest listViews = FakeVmServiceRequest( - method: kListViewsMethod, - jsonResponse: { - 'views': [fakeFlutterView.toJson()], - }, -); - final FakeVmServiceRequest getVM = FakeVmServiceRequest( method: 'getVM', args: {}, @@ -306,51 +294,6 @@ void main() { expect(device.didDispose, true); }); - // FlutterVersion requires context. - testUsingContext( - 'Writes SkSL to file when provided with out file', - () async { - final MemoryFileSystem fileSystem = MemoryFileSystem.test(); - final FakeVmServiceHost fakeVmServiceHost = FakeVmServiceHost( - requests: [ - listViews, - const FakeVmServiceRequest( - method: '_flutter.getSkSLs', - args: {'viewId': 'a'}, - jsonResponse: { - 'SkSLs': {'A': 'B'}, - }, - ), - ], - ); - final FakeProcessManager processManager = FakeProcessManager.empty(); - final DriverService driverService = setUpDriverService( - processManager: processManager, - vmService: fakeVmServiceHost.vmService, - ); - final FakeDevice device = FakeDevice( - LaunchResult.succeeded(vmServiceUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/')), - ); - - await driverService.start( - BuildInfo.profile, - device, - DebuggingOptions.enabled(BuildInfo.profile, ipv6: true), - ); - await driverService.stop(writeSkslOnExit: fileSystem.file('out.json')); - - expect(device.didStopApp, true); - expect(device.didUninstallApp, true); - expect(json.decode(fileSystem.file('out.json').readAsStringSync()), { - 'platform': 'android', - 'name': 'test', - 'engineRevision': 'abcdefghijklmnopqrstuvwxyz', - 'data': {'A': 'B'}, - }); - }, - overrides: {FlutterVersion: () => FakeFlutterVersion()}, - ); - testWithoutContext('Can connect to existing application and stop it during cleanup', () async { final FakeVmServiceHost fakeVmServiceHost = FakeVmServiceHost( requests: [ @@ -500,7 +443,6 @@ FlutterDriverService setUpDriverService({ ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions compression = io.CompressionOptions.compressionDefault, diff --git a/packages/flutter_tools/test/general.shard/flutter_platform_test.dart b/packages/flutter_tools/test/general.shard/flutter_platform_test.dart index 0daf7491337..701e30ff423 100644 --- a/packages/flutter_tools/test/general.shard/flutter_platform_test.dart +++ b/packages/flutter_tools/test/general.shard/flutter_platform_test.dart @@ -468,7 +468,6 @@ void main() { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions? compression, diff --git a/packages/flutter_tools/test/general.shard/hot_shared.dart b/packages/flutter_tools/test/general.shard/hot_shared.dart index 3d7c75aae3a..cd145b350b4 100644 --- a/packages/flutter_tools/test/general.shard/hot_shared.dart +++ b/packages/flutter_tools/test/general.shard/hot_shared.dart @@ -161,7 +161,6 @@ class TestFlutterDevice extends FlutterDevice { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, required DebuggingOptions debuggingOptions, diff --git a/packages/flutter_tools/test/general.shard/integration_test_device_test.dart b/packages/flutter_tools/test/general.shard/integration_test_device_test.dart index fc85b54ee90..a9b4eb7ef30 100644 --- a/packages/flutter_tools/test/general.shard/integration_test_device_test.dart +++ b/packages/flutter_tools/test/general.shard/integration_test_device_test.dart @@ -139,7 +139,6 @@ void main() { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions? compression, @@ -166,7 +165,6 @@ void main() { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions? compression, @@ -202,7 +200,6 @@ void main() { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions? compression, @@ -237,7 +234,6 @@ void main() { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions? compression, @@ -262,7 +258,6 @@ void main() { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions? compression, diff --git a/packages/flutter_tools/test/general.shard/ios/ios_device_start_prebuilt_test.dart b/packages/flutter_tools/test/general.shard/ios/ios_device_start_prebuilt_test.dart index 36eb6666f8d..485c3a75f51 100644 --- a/packages/flutter_tools/test/general.shard/ios/ios_device_start_prebuilt_test.dart +++ b/packages/flutter_tools/test/general.shard/ios/ios_device_start_prebuilt_test.dart @@ -533,9 +533,7 @@ void main() { '--trace-allowlist="foo"', '--trace-skia-allowlist="skia.a,skia.b"', '--endless-trace-buffer', - '--dump-skp-on-shader-compilation', '--verbose-logging', - '--cache-sksl', '--purge-persistent-cache', '--enable-impeller=false', '--enable-embedder-api', @@ -587,8 +585,6 @@ void main() { traceSystrace: true, traceToFile: 'path/to/trace.binpb', endlessTraceBuffer: true, - dumpSkpOnShaderCompilation: true, - cacheSkSL: true, purgePersistentCache: true, verboseSystemLogs: true, enableImpeller: ImpellerStatus.disabled, diff --git a/packages/flutter_tools/test/general.shard/ios/simulators_test.dart b/packages/flutter_tools/test/general.shard/ios/simulators_test.dart index 98ad3124481..82e25f96b5d 100644 --- a/packages/flutter_tools/test/general.shard/ios/simulators_test.dart +++ b/packages/flutter_tools/test/general.shard/ios/simulators_test.dart @@ -1327,9 +1327,7 @@ Dec 20 17:04:32 md32-11-vm1 Another App[88374]: Ignore this text''', traceAllowlist: 'foo,bar', traceSkiaAllowlist: 'skia.a,skia.b', endlessTraceBuffer: true, - dumpSkpOnShaderCompilation: true, verboseSystemLogs: true, - cacheSkSL: true, purgePersistentCache: true, dartFlags: '--baz', enableImpeller: ImpellerStatus.disabled, @@ -1355,9 +1353,7 @@ Dec 20 17:04:32 md32-11-vm1 Another App[88374]: Ignore this text''', '--trace-allowlist="foo,bar"', '--trace-skia-allowlist="skia.a,skia.b"', '--endless-trace-buffer', - '--dump-skp-on-shader-compilation', '--verbose-logging', - '--cache-sksl', '--purge-persistent-cache', '--enable-impeller=false', '--dart-flags=--baz,--null_assertions', diff --git a/packages/flutter_tools/test/general.shard/resident_runner_helpers.dart b/packages/flutter_tools/test/general.shard/resident_runner_helpers.dart index 5774df5f730..388b11b6f62 100644 --- a/packages/flutter_tools/test/general.shard/resident_runner_helpers.dart +++ b/packages/flutter_tools/test/general.shard/resident_runner_helpers.dart @@ -235,7 +235,6 @@ class FakeFlutterDevice extends Fake implements FlutterDevice { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, required DebuggingOptions debuggingOptions, @@ -285,7 +284,6 @@ class FakeDelegateFlutterDevice extends FlutterDevice { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, required DebuggingOptions debuggingOptions, diff --git a/packages/flutter_tools/test/general.shard/resident_runner_test.dart b/packages/flutter_tools/test/general.shard/resident_runner_test.dart index 697164c5013..0a4e3e5fa2b 100644 --- a/packages/flutter_tools/test/general.shard/resident_runner_test.dart +++ b/packages/flutter_tools/test/general.shard/resident_runner_test.dart @@ -15,7 +15,6 @@ import 'package:flutter_tools/src/base/logger.dart'; import 'package:flutter_tools/src/base/platform.dart'; import 'package:flutter_tools/src/build_info.dart'; import 'package:flutter_tools/src/compile.dart'; -import 'package:flutter_tools/src/convert.dart'; import 'package:flutter_tools/src/dart/pub.dart'; import 'package:flutter_tools/src/devfs.dart'; import 'package:flutter_tools/src/device.dart'; @@ -27,7 +26,6 @@ import 'package:flutter_tools/src/resident_devtools_handler.dart'; import 'package:flutter_tools/src/resident_runner.dart'; import 'package:flutter_tools/src/run_cold.dart'; import 'package:flutter_tools/src/run_hot.dart'; -import 'package:flutter_tools/src/version.dart'; import 'package:flutter_tools/src/vmservice.dart'; import 'package:test/fake.dart'; import 'package:unified_analytics/unified_analytics.dart'; @@ -1291,8 +1289,6 @@ flutter: expect(residentRunner.supportsServiceProtocol, true); // isRunningDebug expect(residentRunner.isRunningDebug, true); - // does support SkSL - expect(residentRunner.supportsWriteSkSL, true); // commands expect( testLogger.statusText, @@ -1316,7 +1312,6 @@ flutter: commandHelp.b, commandHelp.P, commandHelp.a, - commandHelp.M, commandHelp.g, commandHelp.hWithDetails, commandHelp.d, @@ -1344,8 +1339,6 @@ flutter: expect(residentRunner.supportsServiceProtocol, true); // isRunningDebug expect(residentRunner.isRunningDebug, true); - // does support SkSL - expect(residentRunner.supportsWriteSkSL, true); // commands expect( testLogger.statusText, @@ -1386,8 +1379,6 @@ flutter: expect(residentRunner.supportsServiceProtocol, false); // isRunningDebug expect(residentRunner.isRunningDebug, false); - // does support SkSL - expect(residentRunner.supportsWriteSkSL, false); // commands expect( testLogger.statusText, @@ -1425,8 +1416,6 @@ flutter: expect(residentRunner.supportsServiceProtocol, false); // isRunningDebug expect(residentRunner.isRunningDebug, false); - // does support SkSL - expect(residentRunner.supportsWriteSkSL, false); // commands expect( testLogger.statusText, @@ -1443,64 +1432,6 @@ flutter: }), ); - testUsingContext( - 'ResidentRunner handles writeSkSL returning no data', - () => testbed.run(() async { - fakeVmServiceHost = FakeVmServiceHost( - requests: [ - listViews, - FakeVmServiceRequest( - method: kGetSkSLsMethod, - args: {'viewId': fakeFlutterView.id}, - jsonResponse: {'SkSLs': {}}, - ), - ], - ); - await residentRunner.writeSkSL(); - - expect(testLogger.statusText, contains('No data was received')); - expect(fakeVmServiceHost?.hasRemainingExpectations, false); - }), - ); - - testUsingContext( - 'ResidentRunner can write SkSL data to a unique file with engine revision, platform, and device name', - () => testbed.run( - () async { - fakeVmServiceHost = FakeVmServiceHost( - requests: [ - listViews, - FakeVmServiceRequest( - method: kGetSkSLsMethod, - args: {'viewId': fakeFlutterView.id}, - jsonResponse: { - 'SkSLs': {'A': 'B'}, - }, - ), - ], - ); - await residentRunner.writeSkSL(); - - expect(testLogger.statusText, contains('flutter_01.sksl.json')); - expect(globals.fs.file('flutter_01.sksl.json'), exists); - expect( - json.decode(globals.fs.file('flutter_01.sksl.json').readAsStringSync()), - { - 'platform': 'android', - 'name': 'FakeDevice', - 'engineRevision': 'abcdefg', - 'data': {'A': 'B'}, - }, - ); - expect(fakeVmServiceHost?.hasRemainingExpectations, false); - }, - overrides: { - FileSystemUtils: () => FileSystemUtils(fileSystem: globals.fs, platform: globals.platform), - FlutterVersion: () => FakeFlutterVersion(engineRevision: 'abcdefg'), - }, - ), - ); - testUsingContext( 'ResidentRunner ignores DevtoolsLauncher when attaching with enableDevTools: false - cold mode', () => testbed.run(() async { @@ -2114,7 +2045,6 @@ flutter: ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions? compression, @@ -2172,7 +2102,6 @@ flutter: ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, io.CompressionOptions? compression, diff --git a/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart b/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart index 52c78683a52..b81ad10957c 100644 --- a/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart +++ b/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart @@ -1814,7 +1814,6 @@ class FakeFlutterDevice extends Fake implements FlutterDevice { ReloadSources? reloadSources, Restart? restart, CompileExpression? compileExpression, - GetSkSLMethod? getSkSLMethod, FlutterProject? flutterProject, PrintStructuredErrorLogMethod? printStructuredErrorLogMethod, required DebuggingOptions debuggingOptions, diff --git a/packages/flutter_tools/test/general.shard/terminal_handler_test.dart b/packages/flutter_tools/test/general.shard/terminal_handler_test.dart index 22275645912..31f31d7210c 100644 --- a/packages/flutter_tools/test/general.shard/terminal_handler_test.dart +++ b/packages/flutter_tools/test/general.shard/terminal_handler_test.dart @@ -1232,9 +1232,6 @@ class FakeResidentRunner extends ResidentHandlers { @override bool supportsServiceProtocol = true; - @override - bool supportsWriteSkSL = true; - @override Future cleanupAfterSignal() async {} diff --git a/packages/flutter_tools/test/general.shard/vmservice_test.dart b/packages/flutter_tools/test/general.shard/vmservice_test.dart index dbbeb6ad834..6615d540f17 100644 --- a/packages/flutter_tools/test/general.shard/vmservice_test.dart +++ b/packages/flutter_tools/test/general.shard/vmservice_test.dart @@ -65,38 +65,6 @@ void main() { expect(mockVMService.services, containsPair(kFlutterMemoryInfoServiceName, kFlutterToolAlias)); }); - testWithoutContext('VM Service registers flutterGetSkSL service', () async { - final MockVMService mockVMService = MockVMService(); - await setUpVmService(skSLMethod: () async => 'hello', vmService: mockVMService); - - expect(mockVMService.services, containsPair(kFlutterGetSkSLServiceName, kFlutterToolAlias)); - }); - - testWithoutContext('VM Service throws tool exit on service registration failure.', () async { - final MockVMService mockVMService = MockVMService()..errorOnRegisterService = true; - - await expectLater( - () async => setUpVmService(skSLMethod: () async => 'hello', vmService: mockVMService), - throwsToolExit(), - ); - }); - - testWithoutContext( - 'VM Service throws tool exit on service registration failure with awaited future.', - () async { - final MockVMService mockVMService = MockVMService()..errorOnRegisterService = true; - - await expectLater( - () async => setUpVmService( - skSLMethod: () async => 'hello', - printStructuredErrorLogMethod: (vm_service.Event event) {}, - vmService: mockVMService, - ), - throwsToolExit(), - ); - }, - ); - testWithoutContext('VM Service registers flutterPrintStructuredErrorLogMethod', () async { final MockVMService mockVMService = MockVMService(); await setUpVmService( @@ -188,18 +156,6 @@ void main() { }); }); - testWithoutContext('getSkSLs forwards arguments correctly', () async { - final MockVMService mockVMService = MockVMService(); - final FlutterVmService flutterVmService = FlutterVmService(mockVMService); - - await flutterVmService.getSkSLs(viewId: 'abc'); - - final ({Map? args, String? isolateId}) call = - mockVMService.calledMethods[kGetSkSLsMethod]!.single; - expect(call.isolateId, isNull); - expect(call.args, {'viewId': 'abc'}); - }); - testWithoutContext('flushUIThreadTasks forwards arguments correctly', () async { final MockVMService mockVMService = MockVMService(); final FlutterVmService flutterVmService = FlutterVmService(mockVMService); @@ -371,11 +327,6 @@ void main() { () async { final FakeVmServiceHost fakeVmServiceHost = FakeVmServiceHost( requests: [ - FakeVmServiceRequest( - method: kGetSkSLsMethod, - args: {'viewId': '1234'}, - error: FakeRPCError(code: vm_service.RPCErrorKind.kServiceDisappeared.code), - ), FakeVmServiceRequest( method: kListViewsMethod, error: FakeRPCError(code: vm_service.RPCErrorKind.kServiceDisappeared.code), @@ -398,11 +349,6 @@ void main() { ], ); - final Map? skSLs = await fakeVmServiceHost.vmService.getSkSLs( - viewId: '1234', - ); - expect(skSLs, isNull); - final List views = await fakeVmServiceHost.vmService.getFlutterViews(); expect(views, isEmpty); diff --git a/packages/flutter_tools/test/integration.shard/command_output_test.dart b/packages/flutter_tools/test/integration.shard/command_output_test.dart index f6a1438d833..9c26e18a0f5 100644 --- a/packages/flutter_tools/test/integration.shard/command_output_test.dart +++ b/packages/flutter_tools/test/integration.shard/command_output_test.dart @@ -192,24 +192,6 @@ void main() { } }); - testWithoutContext('Providing sksl bundle with missing file with tool exit', () async { - final String helloWorld = fileSystem.path.join(getFlutterRoot(), 'examples', 'hello_world'); - final ProcessResult result = await processManager.run([ - flutterBin, - 'build', - 'apk', - '--bundle-sksl-path=foo/bar/baz.json', // This file does not exist. - ], workingDirectory: helloWorld); - - expect( - result, - const ProcessResultMatcher( - exitCode: 1, - stderrPattern: 'No SkSL shader bundle found at foo/bar/baz.json', - ), - ); - }); - testWithoutContext('flutter attach does not support --release', () async { final String helloWorld = fileSystem.path.join(getFlutterRoot(), 'examples', 'hello_world'); final ProcessResult result = await processManager.run([ diff --git a/packages/flutter_tools/test/integration.shard/overall_experience_test.dart b/packages/flutter_tools/test/integration.shard/overall_experience_test.dart index a2609aa2035..1f6d00a8a1e 100644 --- a/packages/flutter_tools/test/integration.shard/overall_experience_test.dart +++ b/packages/flutter_tools/test/integration.shard/overall_experience_test.dart @@ -432,7 +432,6 @@ void main() { 'b Toggle platform brightness (dark and light mode). (debugBrightnessOverride)', 'P Toggle performance overlay. (WidgetsApp.showPerformanceOverlay)', 'a Toggle timeline events for all widget build methods. (debugProfileWidgetBuilds)', - 'M Write SkSL shaders to a unique file in the project directory.', 'g Run source code generators.', 'h Repeat this help message.', 'd Detach (terminate "flutter run" but leave application running).', diff --git a/packages/flutter_tools/test/integration.shard/vmservice_integration_test.dart b/packages/flutter_tools/test/integration.shard/vmservice_integration_test.dart index 3afce0d4d56..049d05ac7e7 100644 --- a/packages/flutter_tools/test/integration.shard/vmservice_integration_test.dart +++ b/packages/flutter_tools/test/integration.shard/vmservice_integration_test.dart @@ -94,12 +94,6 @@ void main() { expect(response, throwsA(const TypeMatcher())); }); - testWithoutContext('flutterGetSkSL can be called', () async { - final Response response = await vmService.callMethod('s0.flutterGetSkSL'); - - expect(response.type, 'Success'); - }); - testWithoutContext('ext.flutter.brightnessOverride can toggle window brightness', () async { final Isolate isolate = await waitForExtension(vmService, 'ext.flutter.brightnessOverride'); final Response response = await vmService.callServiceExtension(