Unverified Commit 6369abb4 authored by Maciej Krüger's avatar Maciej Krüger Committed by GitHub
Browse files

flutter326: drop (#414843)

parents 3764e736 c8817cf8
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
{
  lib,
  flutter326,
  flutter329,
  plant-it,
}:

flutter326.buildFlutterApplication {
flutter329.buildFlutterApplication {
  pname = "plant-it-frontend";
  inherit (plant-it) version src;
  sourceRoot = "source/frontend";

  sourceRoot = "${plant-it.src.name}/frontend";

  targetFlutterPlatform = "web";

@@ -15,5 +16,6 @@ flutter326.buildFlutterApplication {

  meta = plant-it.meta // {
    description = "Frontend for Plant It";
    platforms = lib.platforms.linux;
  };
}
+0 −1056

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −19
Original line number Diff line number Diff line
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
+0 −30
Original line number Diff line number Diff line
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 <command> -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<void> {
           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?;
+0 −69
Original line number Diff line number Diff line
From 6df275df3b8694daf16302b407520e3b1dee6724 Mon Sep 17 00:00:00 2001
From: Philip Hayes <philiphayes9@gmail.com>
Date: Thu, 12 Sep 2024 13:23:00 -0700
Subject: [PATCH] fix: cleanup xcode_backend.sh to fix iOS build w/
 `NixOS/nixpkgs` flutter

This patch cleans up `xcode_backend.sh`. It now effectively just runs
`exec $FLUTTER_ROOT/bin/dart ./xcode_backend.dart`.

The previous `xcode_backend.sh` tries to discover `$FLUTTER_ROOT` from
argv[0], even though its presence is already guaranteed (the wrapped
`xcode_backend.dart` also relies on this env).

When using nixpkgs flutter, the flutter SDK directory is composed of several
layers, joined together using symlinks (called a `symlinkJoin`). Without this
patch, the auto-discover traverses the symlinks into the wrong layer, and so it
uses an "unwrapped" `dart` command instead of a "wrapped" dart that sets some
important envs/flags (like `$FLUTTER_ROOT`).

Using the "unwrapped" dart then manifests in this error when compiling, since
it doesn't see the ios build-support artifacts:

```
$ flutter run -d iphone
Running Xcode build...
Xcode build done.                                            6.4s
Failed to build iOS app
Error (Xcode): Target debug_unpack_ios failed: Error: Flutter failed to create a directory at "/<nix-store>/XXXX-flutter-3.24.1-unwrapped/bin/cache/artifacts".
```
---
 packages/flutter_tools/bin/xcode_backend.sh | 25 ++++-----------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/packages/flutter_tools/bin/xcode_backend.sh b/packages/flutter_tools/bin/xcode_backend.sh
index 2889d7c8e4..48b9d06c6e 100755
--- a/packages/flutter_tools/bin/xcode_backend.sh
+++ b/packages/flutter_tools/bin/xcode_backend.sh
@@ -6,24 +6,7 @@
 # exit on error, or usage of unset var
 set -euo pipefail
 
-# Needed because if it is set, cd may print the path it changed to.
-unset CDPATH
-
-function follow_links() (
-  cd -P "$(dirname -- "$1")"
-  file="$PWD/$(basename -- "$1")"
-  while [[ -h "$file" ]]; do
-    cd -P "$(dirname -- "$file")"
-    file="$(readlink -- "$file")"
-    cd -P "$(dirname -- "$file")"
-    file="$PWD/$(basename -- "$file")"
-  done
-  echo "$file"
-)
-
-PROG_NAME="$(follow_links "${BASH_SOURCE[0]}")"
-BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
-FLUTTER_ROOT="$BIN_DIR/../../.."
-DART="$FLUTTER_ROOT/bin/dart"
-
-"$DART" "$BIN_DIR/xcode_backend.dart" "$@"
+# Run `dart ./xcode_backend.dart` with the dart from $FLUTTER_ROOT.
+dart="${FLUTTER_ROOT}/bin/dart"
+xcode_backend_dart="${BASH_SOURCE[0]%.sh}.dart"
+exec "${dart}" "${xcode_backend_dart}" "$@"
-- 
2.46.0
Loading