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
5e1bb20c
Unverified
Commit
5e1bb20c
authored
Nov 04, 2019
by
Jonah Williams
Committed by
GitHub
Nov 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support --no-resident on the web (#44028)
parent
ee032f67
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
3 deletions
+28
-3
resident_web_runner.dart
...utter_tools/lib/src/build_runner/resident_web_runner.dart
+12
-3
daemon.dart
packages/flutter_tools/lib/src/commands/daemon.dart
+1
-0
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+1
-0
web_runner.dart
packages/flutter_tools/lib/src/web/web_runner.dart
+1
-0
resident_web_runner_test.dart
...er_tools/test/general.shard/resident_web_runner_test.dart
+13
-0
No files found.
packages/flutter_tools/lib/src/build_runner/resident_web_runner.dart
View file @
5e1bb20c
...
...
@@ -36,6 +36,7 @@ class DwdsWebRunnerFactory extends WebRunnerFactory {
ResidentRunner
createWebRunner
(
Device
device
,
{
String
target
,
@required
bool
stayResident
,
@required
FlutterProject
flutterProject
,
@required
bool
ipv6
,
@required
DebuggingOptions
debuggingOptions
,
...
...
@@ -46,6 +47,7 @@ class DwdsWebRunnerFactory extends WebRunnerFactory {
flutterProject:
flutterProject
,
debuggingOptions:
debuggingOptions
,
ipv6:
ipv6
,
stayResident:
stayResident
,
);
}
}
...
...
@@ -57,12 +59,13 @@ class ResidentWebRunner extends ResidentRunner {
@required
this
.
flutterProject
,
@required
bool
ipv6
,
@required
DebuggingOptions
debuggingOptions
,
bool
stayResident
=
true
,
})
:
super
(
<
FlutterDevice
>[],
target:
target
??
fs
.
path
.
join
(
'lib'
,
'main.dart'
),
debuggingOptions:
debuggingOptions
,
ipv6:
ipv6
,
stayResident:
true
,
stayResident:
stayResident
,
);
final
Device
device
;
...
...
@@ -316,9 +319,15 @@ class ResidentWebRunner extends ResidentRunner {
connectionInfoCompleter
?.
complete
(
DebugConnectionInfo
(
wsUri:
websocketUri
)
);
final
int
result
=
await
waitForAppToFinish
();
if
(
stayResident
)
{
await
waitForAppToFinish
();
}
else
{
await
stopEchoingDeviceLog
();
await
exitApp
();
}
await
cleanupAtFinish
();
return
result
;
return
0
;
}
@override
...
...
packages/flutter_tools/lib/src/commands/daemon.dart
View file @
5e1bb20c
...
...
@@ -435,6 +435,7 @@ class AppDomain extends Domain {
target:
target
,
debuggingOptions:
options
,
ipv6:
ipv6
,
stayResident:
true
,
);
}
else
if
(
enableHotReload
)
{
runner
=
HotRunner
(
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
5e1bb20c
...
...
@@ -457,6 +457,7 @@ class RunCommand extends RunCommandBase {
flutterProject:
flutterProject
,
ipv6:
ipv6
,
debuggingOptions:
_createDebuggingOptions
(),
stayResident:
stayResident
,
);
}
else
{
runner
=
ColdRunner
(
...
...
packages/flutter_tools/lib/src/web/web_runner.dart
View file @
5e1bb20c
...
...
@@ -19,6 +19,7 @@ abstract class WebRunnerFactory {
ResidentRunner
createWebRunner
(
Device
device
,
{
String
target
,
@required
bool
stayResident
,
@required
FlutterProject
flutterProject
,
@required
bool
ipv6
,
@required
DebuggingOptions
debuggingOptions
,
...
...
packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
View file @
5e1bb20c
...
...
@@ -154,6 +154,19 @@ void main() {
Logger:
()
=>
DelegateLogger
(
BufferLogger
()),
}));
test
(
'Can successfully run and disconnect with --no-resident'
,
()
=>
testbed
.
run
(()
async
{
_setupMocks
();
residentWebRunner
=
ResidentWebRunner
(
mockWebDevice
,
flutterProject:
FlutterProject
.
current
(),
debuggingOptions:
DebuggingOptions
.
enabled
(
BuildInfo
.
debug
),
ipv6:
true
,
stayResident:
false
,
);
expect
(
await
residentWebRunner
.
run
(),
0
);
}));
test
(
'Listens to stdout streams before running main'
,
()
=>
testbed
.
run
(()
async
{
_setupMocks
();
final
BufferLogger
bufferLogger
=
logger
;
...
...
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