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
fe310148
Unverified
Commit
fe310148
authored
Mar 19, 2020
by
Jonah Williams
Committed by
GitHub
Mar 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tool] Remove extra usage of .packages in vm service API (#52845)
parent
bec7f84a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
12 deletions
+2
-12
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+0
-2
run_hot.dart
packages/flutter_tools/lib/src/run_hot.dart
+1
-1
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+0
-8
resident_runner_test.dart
...lutter_tools/test/general.shard/resident_runner_test.dart
+1
-1
No files found.
packages/flutter_tools/lib/src/resident_runner.dart
View file @
fe310148
...
...
@@ -288,13 +288,11 @@ class FlutterDevice {
bool
pause
=
false
,
})
{
final
Uri
deviceEntryUri
=
devFS
.
baseUri
.
resolveUri
(
globals
.
fs
.
path
.
toUri
(
entryPath
));
final
Uri
devicePackagesUri
=
devFS
.
baseUri
.
resolve
(
'.packages'
);
return
<
Future
<
Map
<
String
,
dynamic
>>>[
for
(
final
Isolate
isolate
in
vmService
.
vm
.
isolates
)
isolate
.
reloadSources
(
pause:
pause
,
rootLibUri:
deviceEntryUri
,
packagesUri:
devicePackagesUri
,
),
];
}
...
...
packages/flutter_tools/lib/src/run_hot.dart
View file @
fe310148
...
...
@@ -460,7 +460,7 @@ class HotRunner extends ResidentRunner {
)
{
return
Future
.
wait
(<
Future
<
void
>>[
for
(
final
FlutterView
view
in
device
.
views
)
view
.
runFromSource
(
entryUri
,
packagesUri
,
assetsDirectoryUri
),
view
.
runFromSource
(
entryUri
,
assetsDirectoryUri
),
]);
}
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
fe310148
...
...
@@ -1040,14 +1040,12 @@ class VM extends ServiceObjectOwner {
Future
<
ServiceMap
>
runInView
(
String
viewId
,
Uri
main
,
Uri
packages
,
Uri
assetsDirectory
,
)
{
return
invokeRpc
<
ServiceMap
>(
'_flutter.runInView'
,
params:
<
String
,
dynamic
>{
'viewId'
:
viewId
,
'mainScript'
:
main
.
toString
(),
'packagesFile'
:
packages
.
toString
(),
'assetDirectory'
:
assetsDirectory
.
toString
(),
});
}
...
...
@@ -1256,7 +1254,6 @@ class Isolate extends ServiceObjectOwner {
Future
<
Map
<
String
,
dynamic
>>
reloadSources
({
bool
pause
=
false
,
Uri
rootLibUri
,
Uri
packagesUri
,
})
async
{
try
{
final
Map
<
String
,
dynamic
>
arguments
=
<
String
,
dynamic
>{
...
...
@@ -1265,9 +1262,6 @@ class Isolate extends ServiceObjectOwner {
if
(
rootLibUri
!=
null
)
{
arguments
[
'rootLibUri'
]
=
rootLibUri
.
toString
();
}
if
(
packagesUri
!=
null
)
{
arguments
[
'packagesUri'
]
=
packagesUri
.
toString
();
}
final
Map
<
String
,
dynamic
>
response
=
await
invokeRpcRaw
(
'_reloadSources'
,
params:
arguments
);
return
response
;
}
on
rpc
.
RpcException
catch
(
e
)
{
...
...
@@ -1492,7 +1486,6 @@ class FlutterView extends ServiceObject {
// TODO(johnmccutchan): Report errors when running failed.
Future
<
void
>
runFromSource
(
Uri
entryUri
,
Uri
packagesUri
,
Uri
assetsDirectoryUri
,
)
async
{
final
String
viewId
=
id
;
...
...
@@ -1511,7 +1504,6 @@ class FlutterView extends ServiceObject {
});
await
owner
.
vm
.
runInView
(
viewId
,
entryUri
,
packagesUri
,
assetsDirectoryUri
);
await
completer
.
future
;
await
owner
.
vm
.
refreshViews
(
waitForViews:
true
);
...
...
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
fe310148
...
...
@@ -96,7 +96,7 @@ void main() {
final
MockVM
mockVM
=
MockVM
();
when
(
mockVMService
.
vm
).
thenReturn
(
mockVM
);
when
(
mockVM
.
isolates
).
thenReturn
(<
Isolate
>[
mockIsolate
]);
when
(
mockFlutterView
.
runFromSource
(
any
,
any
,
any
)).
thenAnswer
((
Invocation
invocation
)
async
{});
when
(
mockFlutterView
.
runFromSource
(
any
,
any
)).
thenAnswer
((
Invocation
invocation
)
async
{});
when
(
mockFlutterDevice
.
stopEchoingDeviceLog
()).
thenAnswer
((
Invocation
invocation
)
async
{
});
when
(
mockFlutterDevice
.
observatoryUris
).
thenAnswer
((
_
)
=>
Stream
<
Uri
>.
value
(
testUri
));
when
(
mockFlutterDevice
.
connect
(
...
...
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