Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
2f599194
Commit
2f599194
authored
Jan 25, 2020
by
Jonah Williams
Committed by
Flutter GitHub Bot
Jan 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] Reland fast start by default for Android (#49315)
parent
782f9cce
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
19 deletions
+12
-19
commands_test.dart
dev/devicelab/bin/tasks/commands_test.dart
+1
-1
named_isolates_test.dart
dev/devicelab/bin/tasks/named_isolates_test.dart
+1
-1
run_machine_concurrent_hot_reload.dart
...evicelab/bin/tasks/run_machine_concurrent_hot_reload.dart
+1
-0
service_extensions_test.dart
dev/devicelab/bin/tasks/service_extensions_test.dart
+1
-1
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+1
-0
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+4
-13
run_test.dart
.../flutter_tools/test/commands.shard/hermetic/run_test.dart
+3
-3
No files found.
dev/devicelab/bin/tasks/commands_test.dart
View file @
2f599194
...
...
@@ -26,7 +26,7 @@ void main() {
print
(
'run: starting...'
);
final
Process
run
=
await
startProcess
(
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
<
String
>[
'run'
,
'--verbose'
,
'--disable-service-auth-codes'
,
'-d'
,
device
.
deviceId
,
'lib/commands.dart'
],
<
String
>[
'run'
,
'--verbose'
,
'--disable-service-auth-codes'
,
'-
-no-fast-start'
,
'-
d'
,
device
.
deviceId
,
'lib/commands.dart'
],
);
final
StreamController
<
String
>
stdout
=
StreamController
<
String
>.
broadcast
();
run
.
stdout
...
...
dev/devicelab/bin/tasks/named_isolates_test.dart
View file @
2f599194
...
...
@@ -26,7 +26,7 @@ void main() {
Completer
<
void
>
firstNameFound
=
Completer
<
void
>();
Completer
<
void
>
secondNameFound
=
Completer
<
void
>();
final
Process
runProcess
=
await
_run
(
device:
device
,
command:
<
String
>[
'run'
,
'--disable-service-auth-codes'
],
stdoutListener:
(
String
line
)
{
<
String
>[
'run'
,
'--disable-service-auth-codes'
,
'--no-fast-start'
],
stdoutListener:
(
String
line
)
{
if
(
line
.
contains
(
_kFirstIsolateName
))
{
firstNameFound
.
complete
();
}
else
if
(
line
.
contains
(
_kSecondIsolateName
))
{
...
...
dev/devicelab/bin/tasks/run_machine_concurrent_hot_reload.dart
View file @
2f599194
...
...
@@ -48,6 +48,7 @@ void main() {
'run'
,
'--machine'
,
'--verbose'
,
'--no-fast-start'
,
'-d'
,
device
.
deviceId
,
'lib/commands.dart'
,
...
...
dev/devicelab/bin/tasks/service_extensions_test.dart
View file @
2f599194
...
...
@@ -25,7 +25,7 @@ void main() {
print
(
'run: starting...'
);
final
Process
run
=
await
startProcess
(
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
<
String
>[
'run'
,
'--verbose'
,
'--disable-service-auth-codes'
,
'-d'
,
device
.
deviceId
,
'lib/main.dart'
],
<
String
>[
'run'
,
'--verbose'
,
'--
no-fast-start'
,
'--
disable-service-auth-codes'
,
'-d'
,
device
.
deviceId
,
'lib/main.dart'
],
);
run
.
stdout
.
transform
<
String
>(
utf8
.
decoder
)
...
...
dev/devicelab/lib/tasks/perf_tests.dart
View file @
2f599194
...
...
@@ -719,6 +719,7 @@ class ReportedDurationTest {
print
(
'launching
$project$test
on device...'
);
await
flutter
(
'run'
,
options:
<
String
>[
'--verbose'
,
'--no-fast-start'
,
'--
${_reportedDurationTestToString(flavor)}
'
,
'--no-resident'
,
'-d'
,
device
.
deviceId
,
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
2f599194
...
...
@@ -189,8 +189,7 @@ class RunCommand extends RunCommandBase {
)
..
addFlag
(
'fast-start'
,
negatable:
true
,
defaultsTo:
false
,
hide:
true
,
defaultsTo:
true
,
help:
'Whether to quickly bootstrap applications with a minimal app. '
'Currently this is only supported on Android devices. This option '
'cannot be paired with --use-application-binary.'
...
...
@@ -319,10 +318,6 @@ class RunCommand extends RunCommandBase {
await
super
.
validateCommand
();
}
if
(
boolArg
(
'fast-start'
)
&&
runningWithPrebuiltApplication
)
{
throwToolExit
(
'--fast-start is not supported with --use-application-binary'
);
}
devices
=
await
findAllTargetDevices
();
if
(
devices
==
null
)
{
throwToolExit
(
null
);
...
...
@@ -365,7 +360,9 @@ class RunCommand extends RunCommandBase {
vmserviceOutFile:
stringArg
(
'vmservice-out-file'
),
// Allow forcing fast-start to off to prevent doing more work on devices that
// don't support it.
fastStart:
boolArg
(
'fast-start'
)
&&
devices
.
every
((
Device
device
)
=>
device
.
supportsFastStart
),
fastStart:
boolArg
(
'fast-start'
)
&&
!
runningWithPrebuiltApplication
&&
devices
.
every
((
Device
device
)
=>
device
.
supportsFastStart
),
);
}
}
...
...
@@ -428,12 +425,6 @@ class RunCommand extends RunCommandBase {
}
for
(
final
Device
device
in
devices
)
{
if
(!
device
.
supportsFastStart
&&
boolArg
(
'fast-start'
))
{
globals
.
printStatus
(
'Using --fast-start option with device
${device.name}
, but this device '
'does not support it. Overriding the setting to false.'
);
}
if
(
await
device
.
isLocalEmulator
)
{
if
(
await
device
.
supportsHardwareRendering
)
{
final
bool
enableSoftwareRendering
=
boolArg
(
'enable-software-rendering'
)
==
true
;
...
...
packages/flutter_tools/test/commands.shard/hermetic/run_test.dart
View file @
2f599194
...
...
@@ -77,7 +77,7 @@ void main() {
]);
fail
(
'Expect exception'
);
}
catch
(
e
)
{
expect
(
e
.
toString
(),
contains
(
'--fast-start is not supported with --use-application-binary'
));
expect
(
e
.
toString
(),
isNot
(
contains
(
'--fast-start is not supported with --use-application-binary'
)
));
}
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
MemoryFileSystem
(),
...
...
@@ -115,10 +115,10 @@ void main() {
}
final
BufferLogger
bufferLogger
=
globals
.
logger
as
BufferLogger
;
expect
(
bufferLogger
.
statusText
,
contains
(
expect
(
bufferLogger
.
statusText
,
isNot
(
contains
(
'Using --fast-start option with device mockdevice, but this device '
'does not support it. Overriding the setting to false.'
));
))
)
;
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
MemoryFileSystem
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment