From a2b56cd6e0995d2ec9ca3e4d20286d9201cd6281 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 22 Aug 2024 17:50:13 -0700 Subject: [PATCH] flutterPackages.v3_24: fix patches --- ...deregister-pub-dependencies-artifact.patch | 0 .../3_13}/patches/disable-auto-update.patch | 0 ...deregister-pub-dependencies-artifact.patch | 19 ++++++++++ .../3_16/patches/disable-auto-update.patch | 37 +++++++++++++++++++ ...deregister-pub-dependencies-artifact.patch | 19 ++++++++++ .../3_19/patches/disable-auto-update.patch | 37 +++++++++++++++++++ ...deregister-pub-dependencies-artifact.patch | 19 ++++++++++ .../3_22/patches/disable-auto-update.patch | 37 +++++++++++++++++++ ...deregister-pub-dependencies-artifact.patch | 19 ++++++++++ .../3_23/patches/disable-auto-update.patch | 37 +++++++++++++++++++ ...deregister-pub-dependencies-artifact.patch | 19 ++++++++++ .../3_24/patches/disable-auto-update.patch | 30 +++++++++++++++ 12 files changed, 273 insertions(+) rename pkgs/development/compilers/flutter/{ => versions/3_13}/patches/deregister-pub-dependencies-artifact.patch (100%) rename pkgs/development/compilers/flutter/{ => versions/3_13}/patches/disable-auto-update.patch (100%) create mode 100644 pkgs/development/compilers/flutter/versions/3_16/patches/deregister-pub-dependencies-artifact.patch create mode 100644 pkgs/development/compilers/flutter/versions/3_16/patches/disable-auto-update.patch create mode 100644 pkgs/development/compilers/flutter/versions/3_19/patches/deregister-pub-dependencies-artifact.patch create mode 100644 pkgs/development/compilers/flutter/versions/3_19/patches/disable-auto-update.patch create mode 100644 pkgs/development/compilers/flutter/versions/3_22/patches/deregister-pub-dependencies-artifact.patch create mode 100644 pkgs/development/compilers/flutter/versions/3_22/patches/disable-auto-update.patch create mode 100644 pkgs/development/compilers/flutter/versions/3_23/patches/deregister-pub-dependencies-artifact.patch create mode 100644 pkgs/development/compilers/flutter/versions/3_23/patches/disable-auto-update.patch create mode 100644 pkgs/development/compilers/flutter/versions/3_24/patches/deregister-pub-dependencies-artifact.patch create mode 100644 pkgs/development/compilers/flutter/versions/3_24/patches/disable-auto-update.patch diff --git a/pkgs/development/compilers/flutter/patches/deregister-pub-dependencies-artifact.patch b/pkgs/development/compilers/flutter/versions/3_13/patches/deregister-pub-dependencies-artifact.patch similarity index 100% rename from pkgs/development/compilers/flutter/patches/deregister-pub-dependencies-artifact.patch rename to pkgs/development/compilers/flutter/versions/3_13/patches/deregister-pub-dependencies-artifact.patch diff --git a/pkgs/development/compilers/flutter/patches/disable-auto-update.patch b/pkgs/development/compilers/flutter/versions/3_13/patches/disable-auto-update.patch similarity index 100% rename from pkgs/development/compilers/flutter/patches/disable-auto-update.patch rename to pkgs/development/compilers/flutter/versions/3_13/patches/disable-auto-update.patch diff --git a/pkgs/development/compilers/flutter/versions/3_16/patches/deregister-pub-dependencies-artifact.patch b/pkgs/development/compilers/flutter/versions/3_16/patches/deregister-pub-dependencies-artifact.patch new file mode 100644 index 000000000000..01e34c6d292c --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_16/patches/deregister-pub-dependencies-artifact.patch @@ -0,0 +1,19 @@ +diff --git a/packages/flutter_tools/lib/src/flutter_cache.dart b/packages/flutter_tools/lib/src/flutter_cache.dart +index 252021cf78..e50ef0885d 100644 +--- a/packages/flutter_tools/lib/src/flutter_cache.dart ++++ b/packages/flutter_tools/lib/src/flutter_cache.dart +@@ -51,14 +51,6 @@ class FlutterCache extends Cache { + registerArtifact(IosUsbArtifacts(artifactName, this, platform: platform)); + } + registerArtifact(FontSubsetArtifacts(this, platform: platform)); +- registerArtifact(PubDependencies( +- logger: logger, +- // flutter root and pub must be lazily initialized to avoid accessing +- // before the version is determined. +- flutterRoot: () => Cache.flutterRoot!, +- pub: () => pub, +- projectFactory: projectFactory, +- )); + } + } + \ No newline at end of file diff --git a/pkgs/development/compilers/flutter/versions/3_16/patches/disable-auto-update.patch b/pkgs/development/compilers/flutter/versions/3_16/patches/disable-auto-update.patch new file mode 100644 index 000000000000..05960c01b737 --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_16/patches/disable-auto-update.patch @@ -0,0 +1,37 @@ +diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart +index b7e624b4e2..edfdde118b 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart +@@ -1554,7 +1554,7 @@ Run 'flutter -h' (or 'flutter -h') for available flutter commands and + + // Populate the cache. We call this before pub get below so that the + // sky_engine package is available in the flutter cache for pub to find. +- if (shouldUpdateCache) { ++ if (false) { + // First always update universal artifacts, as some of these (e.g. + // ios-deploy on macOS) are required to determine `requiredArtifacts`. + final bool offline; +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 5d6d78639f..90a4dfa555 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart +@@ -297,7 +297,6 @@ class FlutterCommandRunner extends CommandRunner { + globals.flutterUsage.suppressAnalytics = true; + } + +- globals.flutterVersion.ensureVersionFile(); + final bool machineFlag = topLevelResults[FlutterGlobalOptions.kMachineFlag] as bool? ?? false; + final bool ci = await globals.botDetector.isRunningOnBot; + final bool redirectedCompletion = !globals.stdio.hasTerminal && +@@ -306,11 +305,6 @@ class FlutterCommandRunner extends CommandRunner { + final bool versionCheckFlag = topLevelResults[FlutterGlobalOptions.kVersionCheckFlag] as bool? ?? false; + final bool explicitVersionCheckPassed = topLevelResults.wasParsed(FlutterGlobalOptions.kVersionCheckFlag) && versionCheckFlag; + +- if (topLevelResults.command?.name != 'upgrade' && +- (explicitVersionCheckPassed || (versionCheckFlag && !isMachine))) { +- await globals.flutterVersion.checkFlutterVersionFreshness(); +- } +- + // See if the user specified a specific device. + final String? specifiedDeviceId = topLevelResults[FlutterGlobalOptions.kDeviceIdOption] as String?; + if (specifiedDeviceId != null) { diff --git a/pkgs/development/compilers/flutter/versions/3_19/patches/deregister-pub-dependencies-artifact.patch b/pkgs/development/compilers/flutter/versions/3_19/patches/deregister-pub-dependencies-artifact.patch new file mode 100644 index 000000000000..01e34c6d292c --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_19/patches/deregister-pub-dependencies-artifact.patch @@ -0,0 +1,19 @@ +diff --git a/packages/flutter_tools/lib/src/flutter_cache.dart b/packages/flutter_tools/lib/src/flutter_cache.dart +index 252021cf78..e50ef0885d 100644 +--- a/packages/flutter_tools/lib/src/flutter_cache.dart ++++ b/packages/flutter_tools/lib/src/flutter_cache.dart +@@ -51,14 +51,6 @@ class FlutterCache extends Cache { + registerArtifact(IosUsbArtifacts(artifactName, this, platform: platform)); + } + registerArtifact(FontSubsetArtifacts(this, platform: platform)); +- registerArtifact(PubDependencies( +- logger: logger, +- // flutter root and pub must be lazily initialized to avoid accessing +- // before the version is determined. +- flutterRoot: () => Cache.flutterRoot!, +- pub: () => pub, +- projectFactory: projectFactory, +- )); + } + } + \ No newline at end of file diff --git a/pkgs/development/compilers/flutter/versions/3_19/patches/disable-auto-update.patch b/pkgs/development/compilers/flutter/versions/3_19/patches/disable-auto-update.patch new file mode 100644 index 000000000000..05960c01b737 --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_19/patches/disable-auto-update.patch @@ -0,0 +1,37 @@ +diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart +index b7e624b4e2..edfdde118b 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart +@@ -1554,7 +1554,7 @@ Run 'flutter -h' (or 'flutter -h') for available flutter commands and + + // Populate the cache. We call this before pub get below so that the + // sky_engine package is available in the flutter cache for pub to find. +- if (shouldUpdateCache) { ++ if (false) { + // First always update universal artifacts, as some of these (e.g. + // ios-deploy on macOS) are required to determine `requiredArtifacts`. + final bool offline; +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 5d6d78639f..90a4dfa555 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart +@@ -297,7 +297,6 @@ class FlutterCommandRunner extends CommandRunner { + globals.flutterUsage.suppressAnalytics = true; + } + +- globals.flutterVersion.ensureVersionFile(); + final bool machineFlag = topLevelResults[FlutterGlobalOptions.kMachineFlag] as bool? ?? false; + final bool ci = await globals.botDetector.isRunningOnBot; + final bool redirectedCompletion = !globals.stdio.hasTerminal && +@@ -306,11 +305,6 @@ class FlutterCommandRunner extends CommandRunner { + final bool versionCheckFlag = topLevelResults[FlutterGlobalOptions.kVersionCheckFlag] as bool? ?? false; + final bool explicitVersionCheckPassed = topLevelResults.wasParsed(FlutterGlobalOptions.kVersionCheckFlag) && versionCheckFlag; + +- if (topLevelResults.command?.name != 'upgrade' && +- (explicitVersionCheckPassed || (versionCheckFlag && !isMachine))) { +- await globals.flutterVersion.checkFlutterVersionFreshness(); +- } +- + // See if the user specified a specific device. + final String? specifiedDeviceId = topLevelResults[FlutterGlobalOptions.kDeviceIdOption] as String?; + if (specifiedDeviceId != null) { diff --git a/pkgs/development/compilers/flutter/versions/3_22/patches/deregister-pub-dependencies-artifact.patch b/pkgs/development/compilers/flutter/versions/3_22/patches/deregister-pub-dependencies-artifact.patch new file mode 100644 index 000000000000..01e34c6d292c --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_22/patches/deregister-pub-dependencies-artifact.patch @@ -0,0 +1,19 @@ +diff --git a/packages/flutter_tools/lib/src/flutter_cache.dart b/packages/flutter_tools/lib/src/flutter_cache.dart +index 252021cf78..e50ef0885d 100644 +--- a/packages/flutter_tools/lib/src/flutter_cache.dart ++++ b/packages/flutter_tools/lib/src/flutter_cache.dart +@@ -51,14 +51,6 @@ class FlutterCache extends Cache { + registerArtifact(IosUsbArtifacts(artifactName, this, platform: platform)); + } + registerArtifact(FontSubsetArtifacts(this, platform: platform)); +- registerArtifact(PubDependencies( +- logger: logger, +- // flutter root and pub must be lazily initialized to avoid accessing +- // before the version is determined. +- flutterRoot: () => Cache.flutterRoot!, +- pub: () => pub, +- projectFactory: projectFactory, +- )); + } + } + \ No newline at end of file diff --git a/pkgs/development/compilers/flutter/versions/3_22/patches/disable-auto-update.patch b/pkgs/development/compilers/flutter/versions/3_22/patches/disable-auto-update.patch new file mode 100644 index 000000000000..05960c01b737 --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_22/patches/disable-auto-update.patch @@ -0,0 +1,37 @@ +diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart +index b7e624b4e2..edfdde118b 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart +@@ -1554,7 +1554,7 @@ Run 'flutter -h' (or 'flutter -h') for available flutter commands and + + // Populate the cache. We call this before pub get below so that the + // sky_engine package is available in the flutter cache for pub to find. +- if (shouldUpdateCache) { ++ if (false) { + // First always update universal artifacts, as some of these (e.g. + // ios-deploy on macOS) are required to determine `requiredArtifacts`. + final bool offline; +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 5d6d78639f..90a4dfa555 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart +@@ -297,7 +297,6 @@ class FlutterCommandRunner extends CommandRunner { + globals.flutterUsage.suppressAnalytics = true; + } + +- globals.flutterVersion.ensureVersionFile(); + final bool machineFlag = topLevelResults[FlutterGlobalOptions.kMachineFlag] as bool? ?? false; + final bool ci = await globals.botDetector.isRunningOnBot; + final bool redirectedCompletion = !globals.stdio.hasTerminal && +@@ -306,11 +305,6 @@ class FlutterCommandRunner extends CommandRunner { + final bool versionCheckFlag = topLevelResults[FlutterGlobalOptions.kVersionCheckFlag] as bool? ?? false; + final bool explicitVersionCheckPassed = topLevelResults.wasParsed(FlutterGlobalOptions.kVersionCheckFlag) && versionCheckFlag; + +- if (topLevelResults.command?.name != 'upgrade' && +- (explicitVersionCheckPassed || (versionCheckFlag && !isMachine))) { +- await globals.flutterVersion.checkFlutterVersionFreshness(); +- } +- + // See if the user specified a specific device. + final String? specifiedDeviceId = topLevelResults[FlutterGlobalOptions.kDeviceIdOption] as String?; + if (specifiedDeviceId != null) { diff --git a/pkgs/development/compilers/flutter/versions/3_23/patches/deregister-pub-dependencies-artifact.patch b/pkgs/development/compilers/flutter/versions/3_23/patches/deregister-pub-dependencies-artifact.patch new file mode 100644 index 000000000000..01e34c6d292c --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_23/patches/deregister-pub-dependencies-artifact.patch @@ -0,0 +1,19 @@ +diff --git a/packages/flutter_tools/lib/src/flutter_cache.dart b/packages/flutter_tools/lib/src/flutter_cache.dart +index 252021cf78..e50ef0885d 100644 +--- a/packages/flutter_tools/lib/src/flutter_cache.dart ++++ b/packages/flutter_tools/lib/src/flutter_cache.dart +@@ -51,14 +51,6 @@ class FlutterCache extends Cache { + registerArtifact(IosUsbArtifacts(artifactName, this, platform: platform)); + } + registerArtifact(FontSubsetArtifacts(this, platform: platform)); +- registerArtifact(PubDependencies( +- logger: logger, +- // flutter root and pub must be lazily initialized to avoid accessing +- // before the version is determined. +- flutterRoot: () => Cache.flutterRoot!, +- pub: () => pub, +- projectFactory: projectFactory, +- )); + } + } + \ No newline at end of file diff --git a/pkgs/development/compilers/flutter/versions/3_23/patches/disable-auto-update.patch b/pkgs/development/compilers/flutter/versions/3_23/patches/disable-auto-update.patch new file mode 100644 index 000000000000..05960c01b737 --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_23/patches/disable-auto-update.patch @@ -0,0 +1,37 @@ +diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart +index b7e624b4e2..edfdde118b 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart +@@ -1554,7 +1554,7 @@ Run 'flutter -h' (or 'flutter -h') for available flutter commands and + + // Populate the cache. We call this before pub get below so that the + // sky_engine package is available in the flutter cache for pub to find. +- if (shouldUpdateCache) { ++ if (false) { + // First always update universal artifacts, as some of these (e.g. + // ios-deploy on macOS) are required to determine `requiredArtifacts`. + final bool offline; +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 5d6d78639f..90a4dfa555 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart +@@ -297,7 +297,6 @@ class FlutterCommandRunner extends CommandRunner { + globals.flutterUsage.suppressAnalytics = true; + } + +- globals.flutterVersion.ensureVersionFile(); + final bool machineFlag = topLevelResults[FlutterGlobalOptions.kMachineFlag] as bool? ?? false; + final bool ci = await globals.botDetector.isRunningOnBot; + final bool redirectedCompletion = !globals.stdio.hasTerminal && +@@ -306,11 +305,6 @@ class FlutterCommandRunner extends CommandRunner { + final bool versionCheckFlag = topLevelResults[FlutterGlobalOptions.kVersionCheckFlag] as bool? ?? false; + final bool explicitVersionCheckPassed = topLevelResults.wasParsed(FlutterGlobalOptions.kVersionCheckFlag) && versionCheckFlag; + +- if (topLevelResults.command?.name != 'upgrade' && +- (explicitVersionCheckPassed || (versionCheckFlag && !isMachine))) { +- await globals.flutterVersion.checkFlutterVersionFreshness(); +- } +- + // See if the user specified a specific device. + final String? specifiedDeviceId = topLevelResults[FlutterGlobalOptions.kDeviceIdOption] as String?; + if (specifiedDeviceId != null) { diff --git a/pkgs/development/compilers/flutter/versions/3_24/patches/deregister-pub-dependencies-artifact.patch b/pkgs/development/compilers/flutter/versions/3_24/patches/deregister-pub-dependencies-artifact.patch new file mode 100644 index 000000000000..01e34c6d292c --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_24/patches/deregister-pub-dependencies-artifact.patch @@ -0,0 +1,19 @@ +diff --git a/packages/flutter_tools/lib/src/flutter_cache.dart b/packages/flutter_tools/lib/src/flutter_cache.dart +index 252021cf78..e50ef0885d 100644 +--- a/packages/flutter_tools/lib/src/flutter_cache.dart ++++ b/packages/flutter_tools/lib/src/flutter_cache.dart +@@ -51,14 +51,6 @@ class FlutterCache extends Cache { + registerArtifact(IosUsbArtifacts(artifactName, this, platform: platform)); + } + registerArtifact(FontSubsetArtifacts(this, platform: platform)); +- registerArtifact(PubDependencies( +- logger: logger, +- // flutter root and pub must be lazily initialized to avoid accessing +- // before the version is determined. +- flutterRoot: () => Cache.flutterRoot!, +- pub: () => pub, +- projectFactory: projectFactory, +- )); + } + } + \ No newline at end of file diff --git a/pkgs/development/compilers/flutter/versions/3_24/patches/disable-auto-update.patch b/pkgs/development/compilers/flutter/versions/3_24/patches/disable-auto-update.patch new file mode 100644 index 000000000000..2ad292efd222 --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_24/patches/disable-auto-update.patch @@ -0,0 +1,30 @@ +diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart +index e4e474ab6e..5548599802 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart +@@ -1693,7 +1693,7 @@ Run 'flutter -h' (or 'flutter -h') for available flutter commands and + + // Populate the cache. We call this before pub get below so that the + // sky_engine package is available in the flutter cache for pub to find. +- if (shouldUpdateCache) { ++ if (false) { + // First always update universal artifacts, as some of these (e.g. + // ios-deploy on macOS) are required to determine `requiredArtifacts`. + final bool offline; +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 50783f8435..db94062840 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart +@@ -377,11 +377,7 @@ class FlutterCommandRunner extends CommandRunner { + globals.analytics.suppressTelemetry(); + } + +- globals.flutterVersion.ensureVersionFile(); + final bool machineFlag = topLevelResults[FlutterGlobalOptions.kMachineFlag] as bool? ?? false; +- if (await _shouldCheckForUpdates(topLevelResults, topLevelMachineFlag: machineFlag)) { +- await globals.flutterVersion.checkFlutterVersionFreshness(); +- } + + // See if the user specified a specific device. + final String? specifiedDeviceId = topLevelResults[FlutterGlobalOptions.kDeviceIdOption] as String?; +