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
22ca3f96
Unverified
Commit
22ca3f96
authored
Jun 12, 2019
by
Zachary Anderson
Committed by
GitHub
Jun 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tool] Don't truncate verbose logs from _flutter.listViews (#34255)
parent
75b5cecc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+8
-2
devfs_test.dart
packages/flutter_tools/test/devfs_test.dart
+1
-0
No files found.
packages/flutter_tools/lib/src/vmservice.dart
View file @
22ca3f96
...
@@ -843,12 +843,15 @@ class VM extends ServiceObjectOwner {
...
@@ -843,12 +843,15 @@ class VM extends ServiceObjectOwner {
Future
<
Map
<
String
,
dynamic
>>
invokeRpcRaw
(
Future
<
Map
<
String
,
dynamic
>>
invokeRpcRaw
(
String
method
,
{
String
method
,
{
Map
<
String
,
dynamic
>
params
=
const
<
String
,
dynamic
>{},
Map
<
String
,
dynamic
>
params
=
const
<
String
,
dynamic
>{},
bool
truncateLogs
=
true
,
})
async
{
})
async
{
printTrace
(
'Sending to VM service:
$method
(
$params
)'
);
printTrace
(
'Sending to VM service:
$method
(
$params
)'
);
assert
(
params
!=
null
);
assert
(
params
!=
null
);
try
{
try
{
final
Map
<
String
,
dynamic
>
result
=
await
_vmService
.
_sendRequest
(
method
,
params
);
final
Map
<
String
,
dynamic
>
result
=
await
_vmService
.
_sendRequest
(
method
,
params
);
printTrace
(
'Result:
${_truncate(result.toString(), 250, '...')}
'
);
final
String
resultString
=
truncateLogs
?
_truncate
(
result
.
toString
(),
250
,
'...'
)
:
result
.
toString
();
printTrace
(
'Result:
$resultString
'
);
return
result
;
return
result
;
}
on
WebSocketChannelException
catch
(
error
)
{
}
on
WebSocketChannelException
catch
(
error
)
{
throwToolExit
(
'Error connecting to observatory:
$error
'
);
throwToolExit
(
'Error connecting to observatory:
$error
'
);
...
@@ -864,10 +867,12 @@ class VM extends ServiceObjectOwner {
...
@@ -864,10 +867,12 @@ class VM extends ServiceObjectOwner {
Future
<
T
>
invokeRpc
<
T
extends
ServiceObject
>(
Future
<
T
>
invokeRpc
<
T
extends
ServiceObject
>(
String
method
,
{
String
method
,
{
Map
<
String
,
dynamic
>
params
=
const
<
String
,
dynamic
>{},
Map
<
String
,
dynamic
>
params
=
const
<
String
,
dynamic
>{},
bool
truncateLogs
=
true
,
})
async
{
})
async
{
final
Map
<
String
,
dynamic
>
response
=
await
invokeRpcRaw
(
final
Map
<
String
,
dynamic
>
response
=
await
invokeRpcRaw
(
method
,
method
,
params:
params
,
params:
params
,
truncateLogs:
truncateLogs
,
);
);
final
ServiceObject
serviceObject
=
ServiceObject
.
_fromMap
(
this
,
response
);
final
ServiceObject
serviceObject
=
ServiceObject
.
_fromMap
(
this
,
response
);
if
((
serviceObject
!=
null
)
&&
(
serviceObject
.
_canCache
))
{
if
((
serviceObject
!=
null
)
&&
(
serviceObject
.
_canCache
))
{
...
@@ -971,7 +976,8 @@ class VM extends ServiceObjectOwner {
...
@@ -971,7 +976,8 @@ class VM extends ServiceObjectOwner {
// When the future returned by invokeRpc() below returns,
// When the future returned by invokeRpc() below returns,
// the _viewCache will have been updated.
// the _viewCache will have been updated.
// This message updates all the views of every isolate.
// This message updates all the views of every isolate.
await
vmService
.
vm
.
invokeRpc
<
ServiceObject
>(
'_flutter.listViews'
);
await
vmService
.
vm
.
invokeRpc
<
ServiceObject
>(
'_flutter.listViews'
,
truncateLogs:
false
);
if
(
_viewCache
.
values
.
isNotEmpty
||
!
waitForViews
)
if
(
_viewCache
.
values
.
isNotEmpty
||
!
waitForViews
)
return
;
return
;
failCount
+=
1
;
failCount
+=
1
;
...
...
packages/flutter_tools/test/devfs_test.dart
View file @
22ca3f96
...
@@ -250,6 +250,7 @@ class MockVM implements VM {
...
@@ -250,6 +250,7 @@ class MockVM implements VM {
Map
<
String
,
dynamic
>
params
=
const
<
String
,
dynamic
>{},
Map
<
String
,
dynamic
>
params
=
const
<
String
,
dynamic
>{},
Duration
timeout
,
Duration
timeout
,
bool
timeoutFatal
=
true
,
bool
timeoutFatal
=
true
,
bool
truncateLogs
=
true
,
})
async
{
})
async
{
_service
.
messages
.
add
(
'
$method
$params
'
);
_service
.
messages
.
add
(
'
$method
$params
'
);
return
<
String
,
dynamic
>{
'success'
:
true
};
return
<
String
,
dynamic
>{
'success'
:
true
};
...
...
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