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
91dd3276
Unverified
Commit
91dd3276
authored
Oct 02, 2021
by
Christopher Fujino
Committed by
GitHub
Oct 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrate vm service to null safety (#88320)
parent
0e784167
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
380 additions
and
380 deletions
+380
-380
asset.dart
packages/flutter_tools/lib/src/asset.dart
+73
-73
compile.dart
packages/flutter_tools/lib/src/compile.dart
+1
-1
devfs.dart
packages/flutter_tools/lib/src/devfs.dart
+64
-67
device.dart
packages/flutter_tools/lib/src/device.dart
+51
-51
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+176
-170
device_test.dart
packages/flutter_tools/test/general.shard/device_test.dart
+1
-1
resident_runner_test.dart
...lutter_tools/test/general.shard/resident_runner_test.dart
+1
-1
fake_vm_services.dart
packages/flutter_tools/test/src/fake_vm_services.dart
+13
-16
No files found.
packages/flutter_tools/lib/src/asset.dart
View file @
91dd3276
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/compile.dart
View file @
91dd3276
...
...
@@ -471,8 +471,8 @@ abstract class ResidentCompiler {
List
<
Uri
>?
invalidatedFiles
,
{
required
String
outputPath
,
required
PackageConfig
packageConfig
,
required
String
projectRootPath
,
required
FileSystem
fs
,
String
?
projectRootPath
,
bool
suppressErrors
=
false
,
bool
checkDartPluginRegistry
=
false
,
});
...
...
packages/flutter_tools/lib/src/devfs.dart
View file @
91dd3276
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/device.dart
View file @
91dd3276
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/vmservice.dart
View file @
91dd3276
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/device_test.dart
View file @
91dd3276
...
...
@@ -481,7 +481,7 @@ void main() {
});
testWithoutContext
(
'computeDartVmFlags handles various combinations of Dart VM flags and null_assertions'
,
()
{
expect
(
computeDartVmFlags
(
DebuggingOptions
.
enabled
(
BuildInfo
.
debug
,
dartFlags:
null
)),
''
);
expect
(
computeDartVmFlags
(
DebuggingOptions
.
enabled
(
BuildInfo
.
debug
)),
''
);
expect
(
computeDartVmFlags
(
DebuggingOptions
.
enabled
(
BuildInfo
.
debug
,
dartFlags:
'--foo'
)),
'--foo'
);
expect
(
computeDartVmFlags
(
DebuggingOptions
.
enabled
(
BuildInfo
.
debug
,
dartFlags:
''
,
nullAssertions:
true
)),
'--null_assertions'
);
expect
(
computeDartVmFlags
(
DebuggingOptions
.
enabled
(
BuildInfo
.
debug
,
dartFlags:
'--foo'
,
nullAssertions:
true
)),
'--foo,--null_assertions'
);
...
...
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
91dd3276
packages/flutter_tools/test/src/fake_vm_services.dart
View file @
91dd3276
...
...
@@ -2,14 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'dart:async'
;
import
'package:flutter_tools/src/base/common.dart'
;
import
'package:flutter_tools/src/convert.dart'
;
import
'package:flutter_tools/src/vmservice.dart'
;
import
'package:meta/meta.dart'
;
import
'package:test_api/test_api.dart'
hide
test
;
// ignore: deprecated_member_use
import
'package:vm_service/vm_service.dart'
as
vm_service
;
...
...
@@ -19,9 +16,9 @@ export 'package:test_api/test_api.dart' hide test, isInstanceOf; // ignore: depr
/// and response structure.
class
FakeVmServiceHost
{
FakeVmServiceHost
({
@
required
List
<
VmServiceExpectation
>
requests
,
Uri
httpAddress
,
Uri
wsAddress
,
required
List
<
VmServiceExpectation
>
requests
,
Uri
?
httpAddress
,
Uri
?
wsAddress
,
})
:
_requests
=
requests
{
_vmService
=
FlutterVmService
(
vm_service
.
VmService
(
_input
.
stream
,
...
...
@@ -44,16 +41,16 @@ class FakeVmServiceHost {
return
;
}
if
(
fakeRequest
.
errorCode
==
null
)
{
_input
.
add
(
json
.
encode
(<
String
,
Object
>{
_input
.
add
(
json
.
encode
(<
String
,
Object
?
>{
'jsonrpc'
:
'2.0'
,
'id'
:
request
[
'id'
],
'result'
:
fakeRequest
.
jsonResponse
??
<
String
,
Object
>{
'type'
:
'Success'
},
}));
}
else
{
_input
.
add
(
json
.
encode
(<
String
,
Object
>{
_input
.
add
(
json
.
encode
(<
String
,
Object
?
>{
'jsonrpc'
:
'2.0'
,
'id'
:
request
[
'id'
],
'error'
:
<
String
,
Object
>{
'error'
:
<
String
,
Object
?
>{
'code'
:
fakeRequest
.
errorCode
,
}
}));
...
...
@@ -67,7 +64,7 @@ class FakeVmServiceHost {
final
StreamController
<
String
>
_output
=
StreamController
<
String
>();
FlutterVmService
get
vmService
=>
_vmService
;
FlutterVmService
_vmService
;
late
final
FlutterVmService
_vmService
;
bool
get
hasRemainingExpectations
=>
_requests
.
isNotEmpty
;
...
...
@@ -95,7 +92,7 @@ abstract class VmServiceExpectation {
class
FakeVmServiceRequest
implements
VmServiceExpectation
{
const
FakeVmServiceRequest
({
@
required
this
.
method
,
required
this
.
method
,
this
.
args
=
const
<
String
,
Object
>{},
this
.
jsonResponse
,
this
.
errorCode
,
...
...
@@ -109,9 +106,9 @@ class FakeVmServiceRequest implements VmServiceExpectation {
/// If non-null, the error code for a [vm_service.RPCError] in place of a
/// standard response.
final
int
errorCode
;
final
Map
<
String
,
Object
>
args
;
final
Map
<
String
,
Object
>
jsonResponse
;
final
int
?
errorCode
;
final
Map
<
String
,
Object
>
?
args
;
final
Map
<
String
,
Object
>
?
jsonResponse
;
@override
bool
get
isRequest
=>
true
;
...
...
@@ -119,8 +116,8 @@ class FakeVmServiceRequest implements VmServiceExpectation {
class
FakeVmServiceStreamResponse
implements
VmServiceExpectation
{
const
FakeVmServiceStreamResponse
({
@
required
this
.
event
,
@
required
this
.
streamId
,
required
this
.
event
,
required
this
.
streamId
,
});
final
vm_service
.
Event
event
;
...
...
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