Skip to content

Commit c1ce56e

Browse files
flutterPackages.v3_24: init (#336650)
2 parents 908b0b2 + ac4b937 commit c1ce56e

15 files changed

+1320
-4
lines changed

pkgs/development/compilers/flutter/engine/package.nix

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ stdenv.mkDerivation (finalAttrs: {
258258
"--linux-cpu ${constants.alt-arch}"
259259
]
260260
++ lib.optional (!isOptimized) "--unoptimized"
261-
++ lib.optional (runtimeMode == "debug") "--no-stripped";
261+
++ lib.optional (runtimeMode == "debug") "--no-stripped"
262+
++ lib.optional finalAttrs.doCheck "--enable-unittests"
263+
++ lib.optional (!finalAttrs.doCheck) "--no-enable-unittests";
262264

263265
# NOTE: Once https://github.com/flutter/flutter/issues/127606 is fixed, use "--no-prebuilt-dart-sdk"
264266
configurePhase =
@@ -305,10 +307,12 @@ stdenv.mkDerivation (finalAttrs: {
305307
runHook preInstall
306308
307309
rm -rf $out/out/$outName/{obj,gen,exe.unstripped,lib.unstripped,zip_archives}
308-
rm $out/out/$outName/{args.gn,build.ninja,build.ninja.d,compile_commands.json,display_list_rendertests,flutter_tester,toolchain.ninja}
310+
rm $out/out/$outName/{args.gn,build.ninja,build.ninja.d,compile_commands.json,toolchain.ninja}
309311
find $out/out/$outName -name '*_unittests' -delete
310312
find $out/out/$outName -name '*_benchmarks' -delete
311-
313+
'' + lib.optionalString (finalAttrs.doCheck) ''
314+
rm $out/out/$outName/{display_list_rendertests,flutter_tester}
315+
'' + ''
312316
runHook postInstall
313317
'';
314318

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/packages/flutter_tools/lib/src/flutter_cache.dart b/packages/flutter_tools/lib/src/flutter_cache.dart
2+
index 252021cf78..e50ef0885d 100644
3+
--- a/packages/flutter_tools/lib/src/flutter_cache.dart
4+
+++ b/packages/flutter_tools/lib/src/flutter_cache.dart
5+
@@ -51,14 +51,6 @@ class FlutterCache extends Cache {
6+
registerArtifact(IosUsbArtifacts(artifactName, this, platform: platform));
7+
}
8+
registerArtifact(FontSubsetArtifacts(this, platform: platform));
9+
- registerArtifact(PubDependencies(
10+
- logger: logger,
11+
- // flutter root and pub must be lazily initialized to avoid accessing
12+
- // before the version is determined.
13+
- flutterRoot: () => Cache.flutterRoot!,
14+
- pub: () => pub,
15+
- projectFactory: projectFactory,
16+
- ));
17+
}
18+
}
19+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart
2+
index b7e624b4e2..edfdde118b 100644
3+
--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart
4+
+++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart
5+
@@ -1554,7 +1554,7 @@ Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and
6+
7+
// Populate the cache. We call this before pub get below so that the
8+
// sky_engine package is available in the flutter cache for pub to find.
9+
- if (shouldUpdateCache) {
10+
+ if (false) {
11+
// First always update universal artifacts, as some of these (e.g.
12+
// ios-deploy on macOS) are required to determine `requiredArtifacts`.
13+
final bool offline;
14+
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
15+
index 5d6d78639f..90a4dfa555 100644
16+
--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
17+
+++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
18+
@@ -297,7 +297,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
19+
globals.flutterUsage.suppressAnalytics = true;
20+
}
21+
22+
- globals.flutterVersion.ensureVersionFile();
23+
final bool machineFlag = topLevelResults[FlutterGlobalOptions.kMachineFlag] as bool? ?? false;
24+
final bool ci = await globals.botDetector.isRunningOnBot;
25+
final bool redirectedCompletion = !globals.stdio.hasTerminal &&
26+
@@ -306,11 +305,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
27+
final bool versionCheckFlag = topLevelResults[FlutterGlobalOptions.kVersionCheckFlag] as bool? ?? false;
28+
final bool explicitVersionCheckPassed = topLevelResults.wasParsed(FlutterGlobalOptions.kVersionCheckFlag) && versionCheckFlag;
29+
30+
- if (topLevelResults.command?.name != 'upgrade' &&
31+
- (explicitVersionCheckPassed || (versionCheckFlag && !isMachine))) {
32+
- await globals.flutterVersion.checkFlutterVersionFreshness();
33+
- }
34+
-
35+
// See if the user specified a specific device.
36+
final String? specifiedDeviceId = topLevelResults[FlutterGlobalOptions.kDeviceIdOption] as String?;
37+
if (specifiedDeviceId != null) {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/packages/flutter_tools/lib/src/flutter_cache.dart b/packages/flutter_tools/lib/src/flutter_cache.dart
2+
index 252021cf78..e50ef0885d 100644
3+
--- a/packages/flutter_tools/lib/src/flutter_cache.dart
4+
+++ b/packages/flutter_tools/lib/src/flutter_cache.dart
5+
@@ -51,14 +51,6 @@ class FlutterCache extends Cache {
6+
registerArtifact(IosUsbArtifacts(artifactName, this, platform: platform));
7+
}
8+
registerArtifact(FontSubsetArtifacts(this, platform: platform));
9+
- registerArtifact(PubDependencies(
10+
- logger: logger,
11+
- // flutter root and pub must be lazily initialized to avoid accessing
12+
- // before the version is determined.
13+
- flutterRoot: () => Cache.flutterRoot!,
14+
- pub: () => pub,
15+
- projectFactory: projectFactory,
16+
- ));
17+
}
18+
}
19+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart
2+
index b7e624b4e2..edfdde118b 100644
3+
--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart
4+
+++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart
5+
@@ -1554,7 +1554,7 @@ Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and
6+
7+
// Populate the cache. We call this before pub get below so that the
8+
// sky_engine package is available in the flutter cache for pub to find.
9+
- if (shouldUpdateCache) {
10+
+ if (false) {
11+
// First always update universal artifacts, as some of these (e.g.
12+
// ios-deploy on macOS) are required to determine `requiredArtifacts`.
13+
final bool offline;
14+
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
15+
index 5d6d78639f..90a4dfa555 100644
16+
--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
17+
+++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
18+
@@ -297,7 +297,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
19+
globals.flutterUsage.suppressAnalytics = true;
20+
}
21+
22+
- globals.flutterVersion.ensureVersionFile();
23+
final bool machineFlag = topLevelResults[FlutterGlobalOptions.kMachineFlag] as bool? ?? false;
24+
final bool ci = await globals.botDetector.isRunningOnBot;
25+
final bool redirectedCompletion = !globals.stdio.hasTerminal &&
26+
@@ -306,11 +305,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
27+
final bool versionCheckFlag = topLevelResults[FlutterGlobalOptions.kVersionCheckFlag] as bool? ?? false;
28+
final bool explicitVersionCheckPassed = topLevelResults.wasParsed(FlutterGlobalOptions.kVersionCheckFlag) && versionCheckFlag;
29+
30+
- if (topLevelResults.command?.name != 'upgrade' &&
31+
- (explicitVersionCheckPassed || (versionCheckFlag && !isMachine))) {
32+
- await globals.flutterVersion.checkFlutterVersionFreshness();
33+
- }
34+
-
35+
// See if the user specified a specific device.
36+
final String? specifiedDeviceId = topLevelResults[FlutterGlobalOptions.kDeviceIdOption] as String?;
37+
if (specifiedDeviceId != null) {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/packages/flutter_tools/lib/src/flutter_cache.dart b/packages/flutter_tools/lib/src/flutter_cache.dart
2+
index 252021cf78..e50ef0885d 100644
3+
--- a/packages/flutter_tools/lib/src/flutter_cache.dart
4+
+++ b/packages/flutter_tools/lib/src/flutter_cache.dart
5+
@@ -51,14 +51,6 @@ class FlutterCache extends Cache {
6+
registerArtifact(IosUsbArtifacts(artifactName, this, platform: platform));
7+
}
8+
registerArtifact(FontSubsetArtifacts(this, platform: platform));
9+
- registerArtifact(PubDependencies(
10+
- logger: logger,
11+
- // flutter root and pub must be lazily initialized to avoid accessing
12+
- // before the version is determined.
13+
- flutterRoot: () => Cache.flutterRoot!,
14+
- pub: () => pub,
15+
- projectFactory: projectFactory,
16+
- ));
17+
}
18+
}
19+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart
2+
index b7e624b4e2..edfdde118b 100644
3+
--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart
4+
+++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart
5+
@@ -1554,7 +1554,7 @@ Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and
6+
7+
// Populate the cache. We call this before pub get below so that the
8+
// sky_engine package is available in the flutter cache for pub to find.
9+
- if (shouldUpdateCache) {
10+
+ if (false) {
11+
// First always update universal artifacts, as some of these (e.g.
12+
// ios-deploy on macOS) are required to determine `requiredArtifacts`.
13+
final bool offline;
14+
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
15+
index 5d6d78639f..90a4dfa555 100644
16+
--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
17+
+++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
18+
@@ -297,7 +297,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
19+
globals.flutterUsage.suppressAnalytics = true;
20+
}
21+
22+
- globals.flutterVersion.ensureVersionFile();
23+
final bool machineFlag = topLevelResults[FlutterGlobalOptions.kMachineFlag] as bool? ?? false;
24+
final bool ci = await globals.botDetector.isRunningOnBot;
25+
final bool redirectedCompletion = !globals.stdio.hasTerminal &&
26+
@@ -306,11 +305,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
27+
final bool versionCheckFlag = topLevelResults[FlutterGlobalOptions.kVersionCheckFlag] as bool? ?? false;
28+
final bool explicitVersionCheckPassed = topLevelResults.wasParsed(FlutterGlobalOptions.kVersionCheckFlag) && versionCheckFlag;
29+
30+
- if (topLevelResults.command?.name != 'upgrade' &&
31+
- (explicitVersionCheckPassed || (versionCheckFlag && !isMachine))) {
32+
- await globals.flutterVersion.checkFlutterVersionFreshness();
33+
- }
34+
-
35+
// See if the user specified a specific device.
36+
final String? specifiedDeviceId = topLevelResults[FlutterGlobalOptions.kDeviceIdOption] as String?;
37+
if (specifiedDeviceId != null) {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/packages/flutter_tools/lib/src/flutter_cache.dart b/packages/flutter_tools/lib/src/flutter_cache.dart
2+
index 252021cf78..e50ef0885d 100644
3+
--- a/packages/flutter_tools/lib/src/flutter_cache.dart
4+
+++ b/packages/flutter_tools/lib/src/flutter_cache.dart
5+
@@ -51,14 +51,6 @@ class FlutterCache extends Cache {
6+
registerArtifact(IosUsbArtifacts(artifactName, this, platform: platform));
7+
}
8+
registerArtifact(FontSubsetArtifacts(this, platform: platform));
9+
- registerArtifact(PubDependencies(
10+
- logger: logger,
11+
- // flutter root and pub must be lazily initialized to avoid accessing
12+
- // before the version is determined.
13+
- flutterRoot: () => Cache.flutterRoot!,
14+
- pub: () => pub,
15+
- projectFactory: projectFactory,
16+
- ));
17+
}
18+
}
19+

0 commit comments

Comments
 (0)