Skip to content

Commit

Permalink
flutterPackages.v3_24: init (#336650)
Browse files Browse the repository at this point in the history
  • Loading branch information
RossComputerGuy authored Aug 28, 2024
2 parents 908b0b2 + ac4b937 commit c1ce56e
Show file tree
Hide file tree
Showing 15 changed files with 1,320 additions and 4 deletions.
10 changes: 7 additions & 3 deletions pkgs/development/compilers/flutter/engine/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ stdenv.mkDerivation (finalAttrs: {
"--linux-cpu ${constants.alt-arch}"
]
++ lib.optional (!isOptimized) "--unoptimized"
++ lib.optional (runtimeMode == "debug") "--no-stripped";
++ lib.optional (runtimeMode == "debug") "--no-stripped"
++ lib.optional finalAttrs.doCheck "--enable-unittests"
++ lib.optional (!finalAttrs.doCheck) "--no-enable-unittests";

# NOTE: Once https://github.com/flutter/flutter/issues/127606 is fixed, use "--no-prebuilt-dart-sdk"
configurePhase =
Expand Down Expand Up @@ -305,10 +307,12 @@ stdenv.mkDerivation (finalAttrs: {
runHook preInstall
rm -rf $out/out/$outName/{obj,gen,exe.unstripped,lib.unstripped,zip_archives}
rm $out/out/$outName/{args.gn,build.ninja,build.ninja.d,compile_commands.json,display_list_rendertests,flutter_tester,toolchain.ninja}
rm $out/out/$outName/{args.gn,build.ninja,build.ninja.d,compile_commands.json,toolchain.ninja}
find $out/out/$outName -name '*_unittests' -delete
find $out/out/$outName -name '*_benchmarks' -delete
'' + lib.optionalString (finalAttrs.doCheck) ''
rm $out/out/$outName/{display_list_rendertests,flutter_tester}
'' + ''
runHook postInstall
'';

Expand Down
Original file line number Diff line number Diff line change
@@ -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,
- ));
}
}

Original file line number Diff line number Diff line change
@@ -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 <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 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<void> {
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<void> {
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) {
Original file line number Diff line number Diff line change
@@ -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,
- ));
}
}

Original file line number Diff line number Diff line change
@@ -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 <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 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<void> {
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<void> {
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) {
Original file line number Diff line number Diff line change
@@ -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,
- ));
}
}

Original file line number Diff line number Diff line change
@@ -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 <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 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<void> {
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<void> {
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) {
Original file line number Diff line number Diff line change
@@ -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,
- ));
}
}

Original file line number Diff line number Diff line change
@@ -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 <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 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<void> {
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<void> {
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) {
Loading

0 comments on commit c1ce56e

Please sign in to comment.