about summary refs log tree commit diff
path: root/pkgs/development/compilers/flutter/patches
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2022-02-06 21:03:45 +0000
committerLuke Granger-Brown <git@lukegb.com>2022-02-06 21:03:45 +0000
commit9dcf20f284561d15869f4fb786a58fc8cfde2db7 (patch)
treee80b050936165ed16bf13bd205e5e569d4dc90de /pkgs/development/compilers/flutter/patches
parent544cf14a773f78724d4d42d888540f5bf13adc5d (diff)
flutter: 2.8.0 -> 2.10.0
Diffstat (limited to 'pkgs/development/compilers/flutter/patches')
-rw-r--r--pkgs/development/compilers/flutter/patches/disable-auto-update.patch16
-rw-r--r--pkgs/development/compilers/flutter/patches/move-cache.patch18
2 files changed, 22 insertions, 12 deletions
diff --git a/pkgs/development/compilers/flutter/patches/disable-auto-update.patch b/pkgs/development/compilers/flutter/patches/disable-auto-update.patch
index d0fd363d3c64f..e799f6e1550b5 100644
--- a/pkgs/development/compilers/flutter/patches/disable-auto-update.patch
+++ b/pkgs/development/compilers/flutter/patches/disable-auto-update.patch
@@ -1,8 +1,8 @@
 diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh
-index be9320210e..6eb50aae95 100644
+index 05cba4393b..2a775bf24f 100644
 --- a/bin/internal/shared.sh
 +++ b/bin/internal/shared.sh
-@@ -218,8 +218,6 @@ function shared::execute() {
+@@ -217,8 +217,6 @@ function shared::execute() {
    # FLUTTER_TOOL_ARGS="--enable-asserts $FLUTTER_TOOL_ARGS"
    # FLUTTER_TOOL_ARGS="$FLUTTER_TOOL_ARGS --observe=65432"
  
@@ -12,19 +12,19 @@ index be9320210e..6eb50aae95 100644
    case "$BIN_NAME" in
      flutter*)
 diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
-index 550a75bc65..c98a4591cc 100644
+index 396756808e..d324a6df59 100644
 --- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
 +++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
-@@ -244,7 +244,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
+@@ -241,7 +241,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
            globals.flutterUsage.suppressAnalytics = true;
          }
  
 -        globals.flutterVersion.ensureVersionFile();
-         final bool machineFlag = topLevelResults['machine'] as bool;
+         final bool machineFlag = topLevelResults['machine'] as bool? ?? false;
          final bool ci = await globals.botDetector.isRunningOnBot;
          final bool redirectedCompletion = !globals.stdio.hasTerminal &&
-@@ -253,10 +252,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
-         final bool versionCheckFlag = topLevelResults['version-check'] as bool;
+@@ -250,10 +249,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
+         final bool versionCheckFlag = topLevelResults['version-check'] as bool? ?? false;
          final bool explicitVersionCheckPassed = topLevelResults.wasParsed('version-check') && versionCheckFlag;
  
 -        if (topLevelResults.command?.name != 'upgrade' &&
@@ -33,4 +33,4 @@ index 550a75bc65..c98a4591cc 100644
 -        }
  
          // See if the user specified a specific device.
-         globals.deviceManager.specifiedDeviceId = topLevelResults['device-id'] as String;
+         globals.deviceManager?.specifiedDeviceId = topLevelResults['device-id'] as String?;
diff --git a/pkgs/development/compilers/flutter/patches/move-cache.patch b/pkgs/development/compilers/flutter/patches/move-cache.patch
index 701cab54d8078..a81d2def242c9 100644
--- a/pkgs/development/compilers/flutter/patches/move-cache.patch
+++ b/pkgs/development/compilers/flutter/patches/move-cache.patch
@@ -1,5 +1,5 @@
 diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart
-index ed42baea29..fee2fb1d62 100644
+index ed42baea29..12941f733a 100644
 --- a/packages/flutter_tools/lib/src/asset.dart
 +++ b/packages/flutter_tools/lib/src/asset.dart
 @@ -11,11 +11,11 @@ import 'base/file_system.dart';
@@ -25,7 +25,7 @@ index ed42baea29..fee2fb1d62 100644
            entryUri: entryUri,
            package: null,
 diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
-index 7870c7807f..3fcf92f20d 100644
+index defc86cc20..7fdf14d112 100644
 --- a/packages/flutter_tools/lib/src/cache.dart
 +++ b/packages/flutter_tools/lib/src/cache.dart
 @@ -22,6 +22,7 @@ import 'base/user_messages.dart';
@@ -36,7 +36,7 @@ index 7870c7807f..3fcf92f20d 100644
  
  const String kFlutterRootEnvironmentVariableName = 'FLUTTER_ROOT'; // should point to //flutter/ (root of flutter/flutter repo)
  const String kFlutterEngineEnvironmentVariableName = 'FLUTTER_ENGINE'; // should point to //engine/src/ (root of flutter/engine repo)
-@@ -302,8 +303,13 @@ class Cache {
+@@ -322,8 +323,13 @@ class Cache {
        return;
      }
      assert(_lock == null);
@@ -51,7 +51,17 @@ index 7870c7807f..3fcf92f20d 100644
      try {
        _lock = lockFile.openSync(mode: FileMode.write);
      } on FileSystemException catch (e) {
-@@ -453,7 +459,7 @@ class Cache {
+@@ -382,8 +388,7 @@ class Cache {
+ 
+   String get devToolsVersion {
+     if (_devToolsVersion == null) {
+-      const String devToolsDirPath = 'dart-sdk/bin/resources/devtools';
+-      final Directory devToolsDir = getCacheDir(devToolsDirPath, shouldCreate: false);
++      final Directory devToolsDir = _fileSystem.directory(_fileSystem.path.join(flutterRoot!, 'bin/cache/dart-sdk/bin/resources/devtools'));
+       if (!devToolsDir.existsSync()) {
+         throw Exception('Could not find directory at ${devToolsDir.path}');
+       }
+@@ -536,7 +541,7 @@ class Cache {
      if (_rootOverride != null) {
        return _fileSystem.directory(_fileSystem.path.join(_rootOverride!.path, 'bin', 'cache'));
      } else {