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
d820e5f3
Unverified
Commit
d820e5f3
authored
May 04, 2018
by
Todd Volkert
Committed by
GitHub
May 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use deprecated io constants (#17278)
The new values are not ready for use yet inside Google
parent
cdbdafa8
Changes
38
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
77 additions
and
75 deletions
+77
-75
crash1_test.dart
dev/automated_tests/test_smoke_test/crash1_test.dart
+1
-1
crash2_test.dart
dev/automated_tests/test_smoke_test/crash2_test.dart
+2
-2
gradle_plugin_test.dart
dev/devicelab/bin/tasks/gradle_plugin_test.dart
+4
-2
ios.dart
dev/devicelab/lib/framework/ios.dart
+1
-1
runner.dart
dev/devicelab/lib/framework/runner.dart
+2
-2
utils.dart
dev/devicelab/lib/framework/utils.dart
+1
-1
microbenchmarks.dart
dev/devicelab/lib/tasks/microbenchmarks.dart
+2
-1
driver.dart
packages/flutter_driver/lib/src/driver/driver.dart
+1
-1
flutter_goldens.dart
packages/flutter_goldens/lib/flutter_goldens.dart
+2
-2
asset.dart
packages/flutter_tools/lib/src/asset.dart
+1
-1
file_system.dart
packages/flutter_tools/lib/src/base/file_system.dart
+4
-4
io.dart
packages/flutter_tools/lib/src/base/io.dart
+7
-8
port_scanner.dart
packages/flutter_tools/lib/src/base/port_scanner.dart
+3
-3
process.dart
packages/flutter_tools/lib/src/base/process.dart
+1
-1
cache.dart
packages/flutter_tools/lib/src/cache.dart
+1
-1
analyze_base.dart
packages/flutter_tools/lib/src/commands/analyze_base.dart
+1
-1
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+3
-3
drive.dart
packages/flutter_tools/lib/src/commands/drive.dart
+2
-2
fuchsia_reload.dart
packages/flutter_tools/lib/src/commands/fuchsia_reload.dart
+1
-1
ide_config.dart
packages/flutter_tools/lib/src/commands/ide_config.dart
+2
-2
dependency_checker.dart
packages/flutter_tools/lib/src/dependency_checker.dart
+1
-1
devfs.dart
packages/flutter_tools/lib/src/devfs.dart
+3
-3
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+1
-1
simulators.dart
packages/flutter_tools/lib/src/ios/simulators.dart
+1
-1
protocol_discovery.dart
packages/flutter_tools/lib/src/protocol_discovery.dart
+1
-1
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+1
-1
services.dart
packages/flutter_tools/lib/src/services.dart
+1
-1
flutter_platform.dart
packages/flutter_tools/lib/src/test/flutter_platform.dart
+9
-9
runner.dart
packages/flutter_tools/lib/src/test/runner.dart
+1
-1
io_test.dart
packages/flutter_tools/test/base/io_test.dart
+1
-1
cache_test.dart
packages/flutter_tools/test/cache_test.dart
+1
-1
create_test.dart
packages/flutter_tools/test/commands/create_test.dart
+1
-1
devices_test.dart
packages/flutter_tools/test/commands/devices_test.dart
+4
-4
fuchsia_reload_test.dart
...ages/flutter_tools/test/commands/fuchsia_reload_test.dart
+2
-2
pub_get_test.dart
packages/flutter_tools/test/dart/pub_get_test.dart
+2
-2
devfs_test.dart
packages/flutter_tools/test/devfs_test.dart
+2
-2
mocks.dart
packages/flutter_tools/test/src/mocks.dart
+1
-1
fuchsia_remote_connection.dart
...ote_debug_protocol/lib/src/fuchsia_remote_connection.dart
+2
-2
No files found.
dev/automated_tests/test_smoke_test/crash1_test.dart
View file @
d820e5f3
...
@@ -11,7 +11,7 @@ import 'package:flutter_test/flutter_test.dart';
...
@@ -11,7 +11,7 @@ import 'package:flutter_test/flutter_test.dart';
void
main
(
)
{
void
main
(
)
{
test
(
'test smoke test -- this test should fail'
,
()
async
{
test
(
'test smoke test -- this test should fail'
,
()
async
{
if
(
system
.
Process
.
killPid
(
system
.
pid
,
system
.
ProcessSignal
.
sigsegv
))
{
if
(
system
.
Process
.
killPid
(
system
.
pid
,
system
.
ProcessSignal
.
SIGSEGV
))
{
// ignore: deprecated_member_use
print
(
'system.Process.killPid returned before the process ended!'
);
print
(
'system.Process.killPid returned before the process ended!'
);
print
(
'Sleeping for a few seconds just in case signal delivery is delayed or our signal handler is being slow...'
);
print
(
'Sleeping for a few seconds just in case signal delivery is delayed or our signal handler is being slow...'
);
system
.
sleep
(
const
Duration
(
seconds:
10
));
// don't sleep too much, we must not time out
system
.
sleep
(
const
Duration
(
seconds:
10
));
// don't sleep too much, we must not time out
...
...
dev/automated_tests/test_smoke_test/crash2_test.dart
View file @
d820e5f3
...
@@ -8,5 +8,5 @@ import 'dart:io' as system;
...
@@ -8,5 +8,5 @@ import 'dart:io' as system;
// see //flutter/dev/bots/test.dart
// see //flutter/dev/bots/test.dart
void
main
(
)
{
void
main
(
)
{
system
.
Process
.
killPid
(
system
.
pid
,
system
.
ProcessSignal
.
sigsegv
);
system
.
Process
.
killPid
(
system
.
pid
,
system
.
ProcessSignal
.
SIGSEGV
);
// ignore: deprecated_member_use
}
}
\ No newline at end of file
dev/devicelab/bin/tasks/gradle_plugin_test.dart
View file @
d820e5f3
...
@@ -131,7 +131,8 @@ class FlutterProject {
...
@@ -131,7 +131,8 @@ class FlutterProject {
final
File
buildScript
=
new
File
(
final
File
buildScript
=
new
File
(
path
.
join
(
androidPath
,
'app'
,
'build.gradle'
),
path
.
join
(
androidPath
,
'app'
,
'build.gradle'
),
);
);
buildScript
.
openWrite
(
mode:
FileMode
.
append
).
write
(
'''
// ignore: deprecated_member_use
buildScript
.
openWrite
(
mode:
FileMode
.
APPEND
).
write
(
'''
android {
android {
buildTypes {
buildTypes {
...
@@ -147,7 +148,8 @@ android {
...
@@ -147,7 +148,8 @@ android {
final
File
buildScript
=
new
File
(
final
File
buildScript
=
new
File
(
path
.
join
(
androidPath
,
'app'
,
'build.gradle'
),
path
.
join
(
androidPath
,
'app'
,
'build.gradle'
),
);
);
buildScript
.
openWrite
(
mode:
FileMode
.
append
).
write
(
'''
// ignore: deprecated_member_use
buildScript
.
openWrite
(
mode:
FileMode
.
APPEND
).
write
(
'''
android {
android {
flavorDimensions "mode"
flavorDimensions "mode"
...
...
dev/devicelab/lib/framework/ios.dart
View file @
d820e5f3
...
@@ -52,7 +52,7 @@ Future<Null> _patchXcconfigFilesIfNotPatched(String flutterProjectPath) async {
...
@@ -52,7 +52,7 @@ Future<Null> _patchXcconfigFilesIfNotPatched(String flutterProjectPath) async {
final
String
contents
=
await
file
.
readAsString
();
final
String
contents
=
await
file
.
readAsString
();
final
bool
alreadyPatched
=
contents
.
contains
(
include
);
final
bool
alreadyPatched
=
contents
.
contains
(
include
);
if
(!
alreadyPatched
)
{
if
(!
alreadyPatched
)
{
final
IOSink
patchOut
=
file
.
openWrite
(
mode:
FileMode
.
append
);
final
IOSink
patchOut
=
file
.
openWrite
(
mode:
FileMode
.
APPEND
);
// ignore: deprecated_member_use
patchOut
.
writeln
();
// in case EOF is not preceded by line break
patchOut
.
writeln
();
// in case EOF is not preceded by line break
patchOut
.
writeln
(
include
);
patchOut
.
writeln
(
include
);
await
patchOut
.
close
();
await
patchOut
.
close
();
...
...
dev/devicelab/lib/framework/runner.dart
View file @
d820e5f3
...
@@ -67,14 +67,14 @@ Future<Map<String, dynamic>> runTask(String taskName, { bool silent: false }) as
...
@@ -67,14 +67,14 @@ Future<Map<String, dynamic>> runTask(String taskName, { bool silent: false }) as
await
runner
.
exitCode
.
timeout
(
const
Duration
(
seconds:
1
));
await
runner
.
exitCode
.
timeout
(
const
Duration
(
seconds:
1
));
return
taskResult
;
return
taskResult
;
}
on
TimeoutException
catch
(
timeout
)
{
}
on
TimeoutException
catch
(
timeout
)
{
runner
.
kill
(
ProcessSignal
.
sigint
);
runner
.
kill
(
ProcessSignal
.
SIGINT
);
// ignore: deprecated_member_use
return
<
String
,
dynamic
>{
return
<
String
,
dynamic
>{
'success'
:
false
,
'success'
:
false
,
'reason'
:
'Timeout waiting for
$waitingFor
:
${timeout.message}
'
,
'reason'
:
'Timeout waiting for
$waitingFor
:
${timeout.message}
'
,
};
};
}
finally
{
}
finally
{
if
(!
runnerFinished
)
if
(!
runnerFinished
)
runner
.
kill
(
ProcessSignal
.
sigkill
);
runner
.
kill
(
ProcessSignal
.
SIGKILL
);
// ignore: deprecated_member_use
await
stdoutSub
.
cancel
();
await
stdoutSub
.
cancel
();
await
stderrSub
.
cancel
();
await
stderrSub
.
cancel
();
}
}
...
...
dev/devicelab/lib/framework/utils.dart
View file @
d820e5f3
...
@@ -460,7 +460,7 @@ Future<int> findAvailablePort() async {
...
@@ -460,7 +460,7 @@ Future<int> findAvailablePort() async {
while
(
true
)
{
while
(
true
)
{
try
{
try
{
final
ServerSocket
socket
=
final
ServerSocket
socket
=
await
ServerSocket
.
bind
(
InternetAddress
.
loopbackIPv4
,
port
);
await
ServerSocket
.
bind
(
InternetAddress
.
LOOPBACK_IP_V4
,
port
);
// ignore: deprecated_member_use
await
socket
.
close
();
await
socket
.
close
();
return
port
;
return
port
;
}
catch
(
_
)
{
}
catch
(
_
)
{
...
...
dev/devicelab/lib/tasks/microbenchmarks.dart
View file @
d820e5f3
...
@@ -126,7 +126,8 @@ Future<Map<String, double>> _readJsonResults(Process process) {
...
@@ -126,7 +126,8 @@ Future<Map<String, double>> _readJsonResults(Process process) {
if
(
line
.
contains
(
jsonEnd
))
{
if
(
line
.
contains
(
jsonEnd
))
{
jsonStarted
=
false
;
jsonStarted
=
false
;
processWasKilledIntentionally
=
true
;
processWasKilledIntentionally
=
true
;
process
.
kill
(
ProcessSignal
.
sigint
);
// flutter run doesn't quit automatically
// ignore: deprecated_member_use
process
.
kill
(
ProcessSignal
.
SIGINT
);
// flutter run doesn't quit automatically
final
String
jsonOutput
=
jsonBuf
.
toString
();
final
String
jsonOutput
=
jsonBuf
.
toString
();
try
{
try
{
completer
.
complete
(
json
.
decode
(
jsonOutput
));
completer
.
complete
(
json
.
decode
(
jsonOutput
));
...
...
packages/flutter_driver/lib/src/driver/driver.dart
View file @
d820e5f3
...
@@ -373,7 +373,7 @@ class FlutterDriver {
...
@@ -373,7 +373,7 @@ class FlutterDriver {
if
(
_logCommunicationToFile
)
{
if
(
_logCommunicationToFile
)
{
final
f
.
File
file
=
fs
.
file
(
p
.
join
(
testOutputsDirectory
,
'flutter_driver_commands_
$_driverId
.log'
));
final
f
.
File
file
=
fs
.
file
(
p
.
join
(
testOutputsDirectory
,
'flutter_driver_commands_
$_driverId
.log'
));
file
.
createSync
(
recursive:
true
);
// no-op if file exists
file
.
createSync
(
recursive:
true
);
// no-op if file exists
file
.
writeAsStringSync
(
'
${new DateTime.now()}
$message
\n
'
,
mode:
f
.
FileMode
.
append
,
flush:
true
);
file
.
writeAsStringSync
(
'
${new DateTime.now()}
$message
\n
'
,
mode:
f
.
FileMode
.
APPEND
,
flush:
true
);
// ignore: deprecated_member_use
}
}
}
}
...
...
packages/flutter_goldens/lib/flutter_goldens.dart
View file @
d820e5f3
...
@@ -209,8 +209,8 @@ class GoldensClient {
...
@@ -209,8 +209,8 @@ class GoldensClient {
Future
<
void
>
_obtainLock
()
async
{
Future
<
void
>
_obtainLock
()
async
{
final
File
lockFile
=
flutterRoot
.
childFile
(
fs
.
path
.
join
(
'bin'
,
'cache'
,
'goldens.lockfile'
));
final
File
lockFile
=
flutterRoot
.
childFile
(
fs
.
path
.
join
(
'bin'
,
'cache'
,
'goldens.lockfile'
));
await
lockFile
.
create
(
recursive:
true
);
await
lockFile
.
create
(
recursive:
true
);
_lock
=
await
lockFile
.
open
(
mode:
io
.
FileMode
.
write
);
_lock
=
await
lockFile
.
open
(
mode:
io
.
FileMode
.
WRITE
);
// ignore: deprecated_member_use
await
_lock
.
lock
(
io
.
FileLock
.
blockingExclusive
);
await
_lock
.
lock
(
io
.
FileLock
.
BLOCKING_EXCLUSIVE
);
// ignore: deprecated_member_use
}
}
Future
<
void
>
_releaseLock
()
async
{
Future
<
void
>
_releaseLock
()
async
{
...
...
packages/flutter_tools/lib/src/asset.dart
View file @
d820e5f3
...
@@ -78,7 +78,7 @@ class _ManifestAssetBundle implements AssetBundle {
...
@@ -78,7 +78,7 @@ class _ManifestAssetBundle implements AssetBundle {
return
true
;
return
true
;
final
FileStat
stat
=
fs
.
file
(
manifestPath
).
statSync
();
final
FileStat
stat
=
fs
.
file
(
manifestPath
).
statSync
();
if
(
stat
.
type
==
FileSystemEntityType
.
notFound
)
if
(
stat
.
type
==
FileSystemEntityType
.
NOT_FOUND
)
// ignore: deprecated_member_use
return
true
;
return
true
;
return
stat
.
modified
.
isAfter
(
_lastBuildTimestamp
);
return
stat
.
modified
.
isAfter
(
_lastBuildTimestamp
);
...
...
packages/flutter_tools/lib/src/base/file_system.dart
View file @
d820e5f3
...
@@ -104,15 +104,15 @@ void copyDirectorySync(Directory srcDir, Directory destDir, [void onFileCopied(F
...
@@ -104,15 +104,15 @@ void copyDirectorySync(Directory srcDir, Directory destDir, [void onFileCopied(F
Directory
getRecordingSink
(
String
dirname
,
String
basename
)
{
Directory
getRecordingSink
(
String
dirname
,
String
basename
)
{
final
String
location
=
_kLocalFs
.
path
.
join
(
dirname
,
basename
);
final
String
location
=
_kLocalFs
.
path
.
join
(
dirname
,
basename
);
switch
(
_kLocalFs
.
typeSync
(
location
,
followLinks:
false
))
{
switch
(
_kLocalFs
.
typeSync
(
location
,
followLinks:
false
))
{
case
FileSystemEntityType
.
file
:
case
FileSystemEntityType
.
FILE
:
// ignore: deprecated_member_use
case
FileSystemEntityType
.
link
:
case
FileSystemEntityType
.
LINK
:
// ignore: deprecated_member_use
throwToolExit
(
'Invalid record-to location:
$dirname
("
$basename
" exists as non-directory)'
);
throwToolExit
(
'Invalid record-to location:
$dirname
("
$basename
" exists as non-directory)'
);
break
;
break
;
case
FileSystemEntityType
.
directory
:
case
FileSystemEntityType
.
DIRECTORY
:
// ignore: deprecated_member_use
if
(
_kLocalFs
.
directory
(
location
).
listSync
(
followLinks:
false
).
isNotEmpty
)
if
(
_kLocalFs
.
directory
(
location
).
listSync
(
followLinks:
false
).
isNotEmpty
)
throwToolExit
(
'Invalid record-to location:
$dirname
("
$basename
" is not empty)'
);
throwToolExit
(
'Invalid record-to location:
$dirname
("
$basename
" is not empty)'
);
break
;
break
;
case
FileSystemEntityType
.
notFound
:
case
FileSystemEntityType
.
NOT_FOUND
:
// ignore: deprecated_member_use
_kLocalFs
.
directory
(
location
).
createSync
(
recursive:
true
);
_kLocalFs
.
directory
(
location
).
createSync
(
recursive:
true
);
}
}
return
_kLocalFs
.
directory
(
location
);
return
_kLocalFs
.
directory
(
location
);
...
...
packages/flutter_tools/lib/src/base/io.dart
View file @
d820e5f3
...
@@ -41,7 +41,7 @@ export 'dart:io'
...
@@ -41,7 +41,7 @@ export 'dart:io'
exitCode
,
exitCode
,
// File NO! Use `file_system.dart`
// File NO! Use `file_system.dart`
// FileSystemEntity NO! Use `file_system.dart`
// FileSystemEntity NO! Use `file_system.dart`
gzip
,
GZIP
,
// ignore: deprecated_member_use
HandshakeException
,
HandshakeException
,
HttpClient
,
HttpClient
,
HttpClientRequest
,
HttpClientRequest
,
...
@@ -71,7 +71,7 @@ export 'dart:io'
...
@@ -71,7 +71,7 @@ export 'dart:io'
// stdout, NO! Use `io.dart`
// stdout, NO! Use `io.dart`
Socket
,
Socket
,
SocketException
,
SocketException
,
systemEncoding
,
SYSTEM_ENCODING
,
// ignore: deprecated_member_use
WebSocket
,
WebSocket
,
WebSocketException
,
WebSocketException
,
WebSocketTransformer
;
WebSocketTransformer
;
...
@@ -116,12 +116,11 @@ class ProcessSignal implements io.ProcessSignal {
...
@@ -116,12 +116,11 @@ class ProcessSignal implements io.ProcessSignal {
@visibleForTesting
@visibleForTesting
const
ProcessSignal
(
this
.
_delegate
);
const
ProcessSignal
(
this
.
_delegate
);
// TODO(yjbanov): make these names consistent with dart:io ones
static
const
ProcessSignal
SIGWINCH
=
const
_PosixProcessSignal
.
_
(
io
.
ProcessSignal
.
SIGWINCH
);
// ignore: deprecated_member_use
static
const
ProcessSignal
SIGWINCH
=
const
_PosixProcessSignal
.
_
(
io
.
ProcessSignal
.
sigwinch
);
static
const
ProcessSignal
SIGTERM
=
const
_PosixProcessSignal
.
_
(
io
.
ProcessSignal
.
SIGTERM
);
// ignore: deprecated_member_use
static
const
ProcessSignal
SIGTERM
=
const
_PosixProcessSignal
.
_
(
io
.
ProcessSignal
.
sigterm
);
static
const
ProcessSignal
SIGUSR1
=
const
_PosixProcessSignal
.
_
(
io
.
ProcessSignal
.
SIGUSR1
);
// ignore: deprecated_member_use
static
const
ProcessSignal
SIGUSR1
=
const
_PosixProcessSignal
.
_
(
io
.
ProcessSignal
.
sigusr1
);
static
const
ProcessSignal
SIGUSR2
=
const
_PosixProcessSignal
.
_
(
io
.
ProcessSignal
.
SIGUSR2
);
// ignore: deprecated_member_use
static
const
ProcessSignal
SIGUSR2
=
const
_PosixProcessSignal
.
_
(
io
.
ProcessSignal
.
sigusr2
);
static
const
ProcessSignal
SIGINT
=
const
ProcessSignal
(
io
.
ProcessSignal
.
SIGINT
);
// ignore: deprecated_member_use
static
const
ProcessSignal
SIGINT
=
const
ProcessSignal
(
io
.
ProcessSignal
.
sigint
);
final
io
.
ProcessSignal
_delegate
;
final
io
.
ProcessSignal
_delegate
;
...
...
packages/flutter_tools/lib/src/base/port_scanner.dart
View file @
d820e5f3
...
@@ -46,7 +46,7 @@ class HostPortScanner extends PortScanner {
...
@@ -46,7 +46,7 @@ class HostPortScanner extends PortScanner {
Future
<
bool
>
isPortAvailable
(
int
port
)
async
{
Future
<
bool
>
isPortAvailable
(
int
port
)
async
{
try
{
try
{
// TODO(ianh): This is super racy.
// TODO(ianh): This is super racy.
final
ServerSocket
socket
=
await
ServerSocket
.
bind
(
InternetAddress
.
loopbackIPv4
,
port
);
final
ServerSocket
socket
=
await
ServerSocket
.
bind
(
InternetAddress
.
LOOPBACK_IP_V4
,
port
);
// ignore: deprecated_member_use
await
socket
.
close
();
await
socket
.
close
();
return
true
;
return
true
;
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -58,9 +58,9 @@ class HostPortScanner extends PortScanner {
...
@@ -58,9 +58,9 @@ class HostPortScanner extends PortScanner {
Future
<
int
>
findAvailablePort
()
async
{
Future
<
int
>
findAvailablePort
()
async
{
ServerSocket
socket
;
ServerSocket
socket
;
try
{
try
{
socket
=
await
ServerSocket
.
bind
(
InternetAddress
.
loopbackIPv4
,
0
);
socket
=
await
ServerSocket
.
bind
(
InternetAddress
.
LOOPBACK_IP_V4
,
0
);
// ignore: deprecated_member_use
}
on
SocketException
{
}
on
SocketException
{
socket
=
await
ServerSocket
.
bind
(
InternetAddress
.
loopbackIPv6
,
0
,
v6Only:
true
);
socket
=
await
ServerSocket
.
bind
(
InternetAddress
.
LOOPBACK_IP_V6
,
0
,
v6Only:
true
);
// ignore: deprecated_member_use
}
}
final
int
port
=
socket
.
port
;
final
int
port
=
socket
.
port
;
await
socket
.
close
();
await
socket
.
close
();
...
...
packages/flutter_tools/lib/src/base/process.dart
View file @
d820e5f3
...
@@ -213,7 +213,7 @@ Future<Process> runDetached(List<String> cmd) {
...
@@ -213,7 +213,7 @@ Future<Process> runDetached(List<String> cmd) {
_traceCommand
(
cmd
);
_traceCommand
(
cmd
);
final
Future
<
Process
>
proc
=
processManager
.
start
(
final
Future
<
Process
>
proc
=
processManager
.
start
(
cmd
,
cmd
,
mode:
ProcessStartMode
.
detached
,
mode:
ProcessStartMode
.
DETACHED
,
// ignore: deprecated_member_use
);
);
return
proc
;
return
proc
;
}
}
...
...
packages/flutter_tools/lib/src/cache.dart
View file @
d820e5f3
...
@@ -74,7 +74,7 @@ class Cache {
...
@@ -74,7 +74,7 @@ class Cache {
if
(!
_lockEnabled
)
if
(!
_lockEnabled
)
return
null
;
return
null
;
assert
(
_lock
==
null
);
assert
(
_lock
==
null
);
_lock
=
await
fs
.
file
(
fs
.
path
.
join
(
flutterRoot
,
'bin'
,
'cache'
,
'lockfile'
)).
open
(
mode:
FileMode
.
write
);
_lock
=
await
fs
.
file
(
fs
.
path
.
join
(
flutterRoot
,
'bin'
,
'cache'
,
'lockfile'
)).
open
(
mode:
FileMode
.
WRITE
);
// ignore: deprecated_member_use
bool
locked
=
false
;
bool
locked
=
false
;
bool
printed
=
false
;
bool
printed
=
false
;
while
(!
locked
)
{
while
(!
locked
)
{
...
...
packages/flutter_tools/lib/src/commands/analyze_base.dart
View file @
d820e5f3
...
@@ -26,7 +26,7 @@ abstract class AnalyzeBase {
...
@@ -26,7 +26,7 @@ abstract class AnalyzeBase {
void
dumpErrors
(
Iterable
<
String
>
errors
)
{
void
dumpErrors
(
Iterable
<
String
>
errors
)
{
if
(
argResults
[
'write'
]
!=
null
)
{
if
(
argResults
[
'write'
]
!=
null
)
{
try
{
try
{
final
RandomAccessFile
resultsFile
=
fs
.
file
(
argResults
[
'write'
]).
openSync
(
mode:
FileMode
.
write
);
final
RandomAccessFile
resultsFile
=
fs
.
file
(
argResults
[
'write'
]).
openSync
(
mode:
FileMode
.
WRITE
);
// ignore: deprecated_member_use
try
{
try
{
resultsFile
.
lockSync
();
resultsFile
.
lockSync
();
resultsFile
.
writeStringSync
(
errors
.
join
(
'
\n
'
));
resultsFile
.
writeStringSync
(
errors
.
join
(
'
\n
'
));
...
...
packages/flutter_tools/lib/src/commands/create.dart
View file @
d820e5f3
...
@@ -408,12 +408,12 @@ String _validateProjectDir(String dirPath, { String flutterRoot }) {
...
@@ -408,12 +408,12 @@ String _validateProjectDir(String dirPath, { String flutterRoot }) {
final
FileSystemEntityType
type
=
fs
.
typeSync
(
dirPath
);
final
FileSystemEntityType
type
=
fs
.
typeSync
(
dirPath
);
if
(
type
!=
FileSystemEntityType
.
notFound
)
{
if
(
type
!=
FileSystemEntityType
.
NOT_FOUND
)
{
// ignore: deprecated_member_use
switch
(
type
)
{
switch
(
type
)
{
case
FileSystemEntityType
.
file
:
case
FileSystemEntityType
.
FILE
:
// ignore: deprecated_member_use
// Do not overwrite files.
// Do not overwrite files.
return
"Invalid project name: '
$dirPath
' - file exists."
;
return
"Invalid project name: '
$dirPath
' - file exists."
;
case
FileSystemEntityType
.
link
:
case
FileSystemEntityType
.
LINK
:
// ignore: deprecated_member_use
// Do not overwrite links.
// Do not overwrite links.
return
"Invalid project name: '
$dirPath
' - refers to a link."
;
return
"Invalid project name: '
$dirPath
' - refers to a link."
;
}
}
...
...
packages/flutter_tools/lib/src/commands/drive.dart
View file @
d820e5f3
...
@@ -94,7 +94,7 @@ class DriveCommand extends RunCommandBase {
...
@@ -94,7 +94,7 @@ class DriveCommand extends RunCommandBase {
if
(
device
==
null
)
if
(
device
==
null
)
throwToolExit
(
null
);
throwToolExit
(
null
);
if
(
await
fs
.
type
(
testFile
)
!=
FileSystemEntityType
.
file
)
if
(
await
fs
.
type
(
testFile
)
!=
FileSystemEntityType
.
FILE
)
// ignore: deprecated_member_use
throwToolExit
(
'Test file not found:
$testFile
'
);
throwToolExit
(
'Test file not found:
$testFile
'
);
String
observatoryUri
;
String
observatoryUri
;
...
@@ -225,7 +225,7 @@ void restoreAppStarter() {
...
@@ -225,7 +225,7 @@ void restoreAppStarter() {
Future
<
LaunchResult
>
_startApp
(
DriveCommand
command
)
async
{
Future
<
LaunchResult
>
_startApp
(
DriveCommand
command
)
async
{
final
String
mainPath
=
findMainDartFile
(
command
.
targetFile
);
final
String
mainPath
=
findMainDartFile
(
command
.
targetFile
);
if
(
await
fs
.
type
(
mainPath
)
!=
FileSystemEntityType
.
file
)
{
if
(
await
fs
.
type
(
mainPath
)
!=
FileSystemEntityType
.
FILE
)
{
// ignore: deprecated_member_use
printError
(
'Tried to run
$mainPath
, but that file does not exist.'
);
printError
(
'Tried to run
$mainPath
, but that file does not exist.'
);
return
null
;
return
null
;
}
}
...
...
packages/flutter_tools/lib/src/commands/fuchsia_reload.dart
View file @
d820e5f3
...
@@ -27,7 +27,7 @@ import '../vmservice.dart';
...
@@ -27,7 +27,7 @@ import '../vmservice.dart';
// $ flutter fuchsia_reload -f ~/fuchsia -a 192.168.1.39 \
// $ flutter fuchsia_reload -f ~/fuchsia -a 192.168.1.39 \
// -g //lib/flutter/examples/flutter_gallery:flutter_gallery
// -g //lib/flutter/examples/flutter_gallery:flutter_gallery
final
String
ipv4Loopback
=
InternetAddress
.
loopbackIPv4
.
address
;
final
String
ipv4Loopback
=
InternetAddress
.
LOOPBACK_IP_V4
.
address
;
// ignore: deprecated_member_use
class
FuchsiaReloadCommand
extends
FlutterCommand
{
class
FuchsiaReloadCommand
extends
FlutterCommand
{
FuchsiaReloadCommand
()
{
FuchsiaReloadCommand
()
{
...
...
packages/flutter_tools/lib/src/commands/ide_config.dart
View file @
d820e5f3
...
@@ -261,9 +261,9 @@ class IdeConfigCommand extends FlutterCommand {
...
@@ -261,9 +261,9 @@ class IdeConfigCommand extends FlutterCommand {
String
_validateFlutterDir
(
String
dirPath
,
{
String
flutterRoot
})
{
String
_validateFlutterDir
(
String
dirPath
,
{
String
flutterRoot
})
{
final
FileSystemEntityType
type
=
fs
.
typeSync
(
dirPath
);
final
FileSystemEntityType
type
=
fs
.
typeSync
(
dirPath
);
if
(
type
!=
FileSystemEntityType
.
notFound
)
{
if
(
type
!=
FileSystemEntityType
.
NOT_FOUND
)
{
// ignore: deprecated_member_use
switch
(
type
)
{
switch
(
type
)
{
case
FileSystemEntityType
.
link
:
case
FileSystemEntityType
.
LINK
:
// ignore: deprecated_member_use
// Do not overwrite links.
// Do not overwrite links.
return
"Invalid project root dir: '
$dirPath
' - refers to a link."
;
return
"Invalid project root dir: '
$dirPath
' - refers to a link."
;
}
}
...
...
packages/flutter_tools/lib/src/dependency_checker.dart
View file @
d820e5f3
...
@@ -30,7 +30,7 @@ class DependencyChecker {
...
@@ -30,7 +30,7 @@ class DependencyChecker {
for
(
String
path
in
_dependencies
)
{
for
(
String
path
in
_dependencies
)
{
final
File
file
=
fs
.
file
(
path
);
final
File
file
=
fs
.
file
(
path
);
final
FileStat
stat
=
file
.
statSync
();
final
FileStat
stat
=
file
.
statSync
();
if
(
stat
.
type
==
FileSystemEntityType
.
notFound
)
{
if
(
stat
.
type
==
FileSystemEntityType
.
NOT_FOUND
)
{
// ignore: deprecated_member_use
printTrace
(
'DependencyChecker: Error stating
$path
.'
);
printTrace
(
'DependencyChecker: Error stating
$path
.'
);
return
true
;
return
true
;
}
}
...
...
packages/flutter_tools/lib/src/devfs.dart
View file @
d820e5f3
...
@@ -46,7 +46,7 @@ abstract class DevFSContent {
...
@@ -46,7 +46,7 @@ abstract class DevFSContent {
Stream
<
List
<
int
>>
contentsAsStream
();
Stream
<
List
<
int
>>
contentsAsStream
();
Stream
<
List
<
int
>>
contentsAsCompressedStream
()
{
Stream
<
List
<
int
>>
contentsAsCompressedStream
()
{
return
contentsAsStream
().
transform
(
gzip
.
encoder
);
return
contentsAsStream
().
transform
(
GZIP
.
encoder
);
// ignore: deprecated_member_use
}
}
/// Return the list of files this content depends on.
/// Return the list of files this content depends on.
...
@@ -86,7 +86,7 @@ class DevFSFileContent extends DevFSContent {
...
@@ -86,7 +86,7 @@ class DevFSFileContent extends DevFSContent {
return
;
return
;
}
}
_fileStat
=
file
.
statSync
();
_fileStat
=
file
.
statSync
();
if
(
_fileStat
.
type
==
FileSystemEntityType
.
link
)
{
if
(
_fileStat
.
type
==
FileSystemEntityType
.
LINK
)
{
// ignore: deprecated_member_use
// Resolve, stat, and maybe cache the symlink target.
// Resolve, stat, and maybe cache the symlink target.
final
String
resolved
=
file
.
resolveSymbolicLinksSync
();
final
String
resolved
=
file
.
resolveSymbolicLinksSync
();
final
FileSystemEntity
linkTarget
=
fs
.
file
(
resolved
);
final
FileSystemEntity
linkTarget
=
fs
.
file
(
resolved
);
...
@@ -661,7 +661,7 @@ class DevFS {
...
@@ -661,7 +661,7 @@ class DevFS {
try
{
try
{
final
FileSystemEntityType
linkType
=
final
FileSystemEntityType
linkType
=
fs
.
statSync
(
file
.
resolveSymbolicLinksSync
()).
type
;
fs
.
statSync
(
file
.
resolveSymbolicLinksSync
()).
type
;
if
(
linkType
==
FileSystemEntityType
.
directory
)
if
(
linkType
==
FileSystemEntityType
.
DIRECTORY
)
// ignore: deprecated_member_use
continue
;
continue
;
}
on
FileSystemException
catch
(
e
)
{
}
on
FileSystemException
catch
(
e
)
{
_printScanDirectoryError
(
file
.
path
,
e
);
_printScanDirectoryError
(
file
.
path
,
e
);
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
d820e5f3
...
@@ -639,7 +639,7 @@ void _copyServiceDefinitionsManifest(List<Map<String, String>> services, File ma
...
@@ -639,7 +639,7 @@ void _copyServiceDefinitionsManifest(List<Map<String, String>> services, File ma
'framework'
:
fs
.
path
.
basenameWithoutExtension
(
service
[
'ios-framework'
])
'framework'
:
fs
.
path
.
basenameWithoutExtension
(
service
[
'ios-framework'
])
}).
toList
();
}).
toList
();
final
Map
<
String
,
dynamic
>
jsonObject
=
<
String
,
dynamic
>{
'services'
:
jsonServices
};
final
Map
<
String
,
dynamic
>
jsonObject
=
<
String
,
dynamic
>{
'services'
:
jsonServices
};
manifest
.
writeAsStringSync
(
json
.
encode
(
jsonObject
),
mode:
FileMode
.
write
,
flush:
true
);
manifest
.
writeAsStringSync
(
json
.
encode
(
jsonObject
),
mode:
FileMode
.
WRITE
,
flush:
true
);
// ignore: deprecated_member_use
}
}
Future
<
bool
>
upgradePbxProjWithFlutterAssets
(
String
app
,
String
appPath
)
async
{
Future
<
bool
>
upgradePbxProjWithFlutterAssets
(
String
app
,
String
appPath
)
async
{
...
...
packages/flutter_tools/lib/src/ios/simulators.dart
View file @
d820e5f3
...
@@ -454,7 +454,7 @@ class IOSSimulator extends Device {
...
@@ -454,7 +454,7 @@ class IOSSimulator extends Device {
void
clearLogs
()
{
void
clearLogs
()
{
final
File
logFile
=
fs
.
file
(
logFilePath
);
final
File
logFile
=
fs
.
file
(
logFilePath
);
if
(
logFile
.
existsSync
())
{
if
(
logFile
.
existsSync
())
{
final
RandomAccessFile
randomFile
=
logFile
.
openSync
(
mode:
FileMode
.
write
);
final
RandomAccessFile
randomFile
=
logFile
.
openSync
(
mode:
FileMode
.
WRITE
);
// ignore: deprecated_member_use
randomFile
.
truncateSync
(
0
);
randomFile
.
truncateSync
(
0
);
randomFile
.
closeSync
();
randomFile
.
closeSync
();
}
}
...
...
packages/flutter_tools/lib/src/protocol_discovery.dart
View file @
d820e5f3
...
@@ -97,7 +97,7 @@ class ProtocolDiscovery {
...
@@ -97,7 +97,7 @@ class ProtocolDiscovery {
assert
(
new
InternetAddress
(
hostUri
.
host
).
isLoopback
);
assert
(
new
InternetAddress
(
hostUri
.
host
).
isLoopback
);
if
(
ipv6
)
{
if
(
ipv6
)
{
hostUri
=
hostUri
.
replace
(
host:
InternetAddress
.
loopbackIPv6
.
host
);
hostUri
=
hostUri
.
replace
(
host:
InternetAddress
.
LOOPBACK_IP_V6
.
host
);
// ignore: deprecated_member_use
}
}
return
hostUri
;
return
hostUri
;
...
...
packages/flutter_tools/lib/src/resident_runner.dart
View file @
d820e5f3
...
@@ -808,7 +808,7 @@ abstract class ResidentRunner {
...
@@ -808,7 +808,7 @@ abstract class ResidentRunner {
if
(
path
==
null
)
if
(
path
==
null
)
return
true
;
return
true
;
final
FileStat
stat
=
fs
.
file
(
path
).
statSync
();
final
FileStat
stat
=
fs
.
file
(
path
).
statSync
();
if
(
stat
.
type
!=
FileSystemEntityType
.
file
)
if
(
stat
.
type
!=
FileSystemEntityType
.
FILE
)
// ignore: deprecated_member_use
return
true
;
return
true
;
if
(!
fs
.
file
(
path
).
existsSync
())
if
(!
fs
.
file
(
path
).
existsSync
())
return
true
;
return
true
;
...
...
packages/flutter_tools/lib/src/services.dart
View file @
d820e5f3
...
@@ -105,6 +105,6 @@ File generateServiceDefinitions(
...
@@ -105,6 +105,6 @@ File generateServiceDefinitions(
final
Map
<
String
,
dynamic
>
jsonObject
=
<
String
,
dynamic
>{
'services'
:
services
};
final
Map
<
String
,
dynamic
>
jsonObject
=
<
String
,
dynamic
>{
'services'
:
services
};
final
File
servicesFile
=
fs
.
file
(
fs
.
path
.
join
(
dir
,
'services.json'
));
final
File
servicesFile
=
fs
.
file
(
fs
.
path
.
join
(
dir
,
'services.json'
));
servicesFile
.
writeAsStringSync
(
json
.
encode
(
jsonObject
),
mode:
FileMode
.
write
,
flush:
true
);
servicesFile
.
writeAsStringSync
(
json
.
encode
(
jsonObject
),
mode:
FileMode
.
WRITE
,
flush:
true
);
// ignore: deprecated_member_use
return
servicesFile
;
return
servicesFile
;
}
}
packages/flutter_tools/lib/src/test/flutter_platform.dart
View file @
d820e5f3
...
@@ -52,8 +52,8 @@ const String _kProjectRootSentinel = 'pubspec.yaml';
...
@@ -52,8 +52,8 @@ const String _kProjectRootSentinel = 'pubspec.yaml';
/// The address at which our WebSocket server resides and at which the sky_shell
/// The address at which our WebSocket server resides and at which the sky_shell
/// processes will host the Observatory server.
/// processes will host the Observatory server.
final
Map
<
InternetAddressType
,
InternetAddress
>
_kHosts
=
<
InternetAddressType
,
InternetAddress
>{
final
Map
<
InternetAddressType
,
InternetAddress
>
_kHosts
=
<
InternetAddressType
,
InternetAddress
>{
InternetAddressType
.
IP
v4
:
InternetAddress
.
loopbackIPv4
,
InternetAddressType
.
IP
_V4
:
InternetAddress
.
LOOPBACK_IP_V4
,
// ignore: deprecated_member_use
InternetAddressType
.
IP
v6
:
InternetAddress
.
loopbackIPv6
,
InternetAddressType
.
IP
_V6
:
InternetAddress
.
LOOPBACK_IP_V6
,
// ignore: deprecated_member_use
};
};
/// Configure the `test` package to work with Flutter.
/// Configure the `test` package to work with Flutter.
...
@@ -73,7 +73,7 @@ void installHook({
...
@@ -73,7 +73,7 @@ void installHook({
bool
trackWidgetCreation:
false
,
bool
trackWidgetCreation:
false
,
bool
updateGoldens:
false
,
bool
updateGoldens:
false
,
int
observatoryPort
,
int
observatoryPort
,
InternetAddressType
serverType:
InternetAddressType
.
IP
v4
,
InternetAddressType
serverType:
InternetAddressType
.
IP
_V4
,
// ignore: deprecated_member_use
})
{
})
{
assert
(!
enableObservatory
||
(!
startPaused
&&
observatoryPort
==
null
));
assert
(!
enableObservatory
||
(!
startPaused
&&
observatoryPort
==
null
));
hack
.
registerPlatformPlugin
(
hack
.
registerPlatformPlugin
(
...
@@ -622,7 +622,7 @@ class _FlutterPlatform extends PlatformPlugin {
...
@@ -622,7 +622,7 @@ class _FlutterPlatform extends PlatformPlugin {
}
}
String
_getWebSocketUrl
()
{
String
_getWebSocketUrl
()
{
return
host
.
type
==
InternetAddressType
.
IP
v4
return
host
.
type
==
InternetAddressType
.
IP
_V4
// ignore: deprecated_member_use
?
'ws://
${host.address}
'
?
'ws://
${host.address}
'
:
'ws://[
${host.address}
]'
;
:
'ws://[
${host.address}
]'
;
}
}
...
@@ -766,7 +766,7 @@ void main() {
...
@@ -766,7 +766,7 @@ void main() {
}
else
{
}
else
{
command
.
add
(
'--disable-observatory'
);
command
.
add
(
'--disable-observatory'
);
}
}
if
(
host
.
type
==
InternetAddressType
.
IP
v6
)
if
(
host
.
type
==
InternetAddressType
.
IP
_V6
)
// ignore: deprecated_member_use
command
.
add
(
'--ipv6'
);
command
.
add
(
'--ipv6'
);
if
(
bundlePath
!=
null
)
{
if
(
bundlePath
!=
null
)
{
command
.
add
(
'--flutter-assets-dir=
$bundlePath
'
);
command
.
add
(
'--flutter-assets-dir=
$bundlePath
'
);
...
@@ -838,13 +838,13 @@ void main() {
...
@@ -838,13 +838,13 @@ void main() {
return
'Shell subprocess cleanly reported an error
$when
. Check the logs above for an error message.'
;
return
'Shell subprocess cleanly reported an error
$when
. Check the logs above for an error message.'
;
case
0
:
case
0
:
return
'Shell subprocess ended cleanly
$when
. Did main() call exit()?'
;
return
'Shell subprocess ended cleanly
$when
. Did main() call exit()?'
;
case
-
0x0f
:
// ProcessSignal.
sigterm
case
-
0x0f
:
// ProcessSignal.
SIGTERM
return
'Shell subprocess crashed with SIGTERM (
$exitCode
)
$when
.'
;
return
'Shell subprocess crashed with SIGTERM (
$exitCode
)
$when
.'
;
case
-
0x0b
:
// ProcessSignal.
sigsegv
case
-
0x0b
:
// ProcessSignal.
SIGSEGV
return
'Shell subprocess crashed with segmentation fault
$when
.'
;
return
'Shell subprocess crashed with segmentation fault
$when
.'
;
case
-
0x06
:
// ProcessSignal.
sigabrt
case
-
0x06
:
// ProcessSignal.
SIGABRT
return
'Shell subprocess crashed with SIGABRT (
$exitCode
)
$when
.'
;
return
'Shell subprocess crashed with SIGABRT (
$exitCode
)
$when
.'
;
case
-
0x02
:
// ProcessSignal.
sigint
case
-
0x02
:
// ProcessSignal.
SIGINT
return
'Shell subprocess terminated by ^C (SIGINT,
$exitCode
)
$when
.'
;
return
'Shell subprocess terminated by ^C (SIGINT,
$exitCode
)
$when
.'
;
default
:
default
:
return
'Shell subprocess crashed with unexpected exit code
$exitCode
$when
.'
;
return
'Shell subprocess crashed with unexpected exit code
$exitCode
$when
.'
;
...
...
packages/flutter_tools/lib/src/test/runner.dart
View file @
d820e5f3
...
@@ -77,7 +77,7 @@ Future<int> runTests(
...
@@ -77,7 +77,7 @@ Future<int> runTests(
throwToolExit
(
'Cannot find Flutter shell at
$shellPath
'
);
throwToolExit
(
'Cannot find Flutter shell at
$shellPath
'
);
final
InternetAddressType
serverType
=
final
InternetAddressType
serverType
=
ipv6
?
InternetAddressType
.
IP
v6
:
InternetAddressType
.
IPv4
;
ipv6
?
InternetAddressType
.
IP
_V6
:
InternetAddressType
.
IP_V4
;
// ignore: deprecated_member_use
loader
.
installHook
(
loader
.
installHook
(
shellPath:
shellPath
,
shellPath:
shellPath
,
...
...
packages/flutter_tools/test/base/io_test.dart
View file @
d820e5f3
...
@@ -26,7 +26,7 @@ void main() {
...
@@ -26,7 +26,7 @@ void main() {
});
});
testUsingContext
(
'toString() works'
,
()
async
{
testUsingContext
(
'toString() works'
,
()
async
{
expect
(
io
.
ProcessSignal
.
sigint
.
toString
(),
ProcessSignal
.
SIGINT
.
toString
());
expect
(
io
.
ProcessSignal
.
SIGINT
.
toString
(),
ProcessSignal
.
SIGINT
.
toString
());
// ignore: deprecated_member_use
});
});
});
});
}
}
...
...
packages/flutter_tools/test/cache_test.dart
View file @
d820e5f3
...
@@ -124,7 +124,7 @@ class MockFileSystem extends ForwardingFileSystem {
...
@@ -124,7 +124,7 @@ class MockFileSystem extends ForwardingFileSystem {
class
MockFile
extends
Mock
implements
File
{
class
MockFile
extends
Mock
implements
File
{
@override
@override
Future
<
RandomAccessFile
>
open
({
FileMode
mode:
FileMode
.
read
})
async
{
Future
<
RandomAccessFile
>
open
({
FileMode
mode:
FileMode
.
READ
})
async
{
// ignore: deprecated_member_use
return
new
MockRandomAccessFile
();
return
new
MockRandomAccessFile
();
}
}
}
}
...
...
packages/flutter_tools/test/commands/create_test.dart
View file @
d820e5f3
...
@@ -508,7 +508,7 @@ class LoggingProcessManager extends LocalProcessManager {
...
@@ -508,7 +508,7 @@ class LoggingProcessManager extends LocalProcessManager {
Map
<
String
,
String
>
environment
,
Map
<
String
,
String
>
environment
,
bool
includeParentEnvironment:
true
,
bool
includeParentEnvironment:
true
,
bool
runInShell:
false
,
bool
runInShell:
false
,
ProcessStartMode
mode:
ProcessStartMode
.
normal
,
ProcessStartMode
mode:
ProcessStartMode
.
NORMAL
,
// ignore: deprecated_member_use
})
{
})
{
commands
.
add
(
command
);
commands
.
add
(
command
);
return
super
.
start
(
return
super
.
start
(
...
...
packages/flutter_tools/test/commands/devices_test.dart
View file @
d820e5f3
...
@@ -48,8 +48,8 @@ class MockProcessManager extends Mock implements ProcessManager {
...
@@ -48,8 +48,8 @@ class MockProcessManager extends Mock implements ProcessManager {
Map
<
String
,
String
>
environment
,
Map
<
String
,
String
>
environment
,
bool
includeParentEnvironment:
true
,
bool
includeParentEnvironment:
true
,
bool
runInShell:
false
,
bool
runInShell:
false
,
Encoding
stdoutEncoding:
systemEncoding
,
Encoding
stdoutEncoding:
SYSTEM_ENCODING
,
// ignore: deprecated_member_use
Encoding
stderrEncoding:
systemEncoding
,
Encoding
stderrEncoding:
SYSTEM_ENCODING
,
// ignore: deprecated_member_use
})
async
{
})
async
{
return
new
ProcessResult
(
0
,
0
,
''
,
''
);
return
new
ProcessResult
(
0
,
0
,
''
,
''
);
}
}
...
@@ -61,8 +61,8 @@ class MockProcessManager extends Mock implements ProcessManager {
...
@@ -61,8 +61,8 @@ class MockProcessManager extends Mock implements ProcessManager {
Map
<
String
,
String
>
environment
,
Map
<
String
,
String
>
environment
,
bool
includeParentEnvironment:
true
,
bool
includeParentEnvironment:
true
,
bool
runInShell:
false
,
bool
runInShell:
false
,
Encoding
stdoutEncoding:
systemEncoding
,
Encoding
stdoutEncoding:
SYSTEM_ENCODING
,
// ignore: deprecated_member_use
Encoding
stderrEncoding:
systemEncoding
,
Encoding
stderrEncoding:
SYSTEM_ENCODING
,
// ignore: deprecated_member_use
})
{
})
{
return
new
ProcessResult
(
0
,
0
,
''
,
''
);
return
new
ProcessResult
(
0
,
0
,
''
,
''
);
}
}
...
...
packages/flutter_tools/test/commands/fuchsia_reload_test.dart
View file @
d820e5f3
...
@@ -38,8 +38,8 @@ class MockProcessManager extends Mock implements ProcessManager {
...
@@ -38,8 +38,8 @@ class MockProcessManager extends Mock implements ProcessManager {
Map
<
String
,
String
>
environment
,
Map
<
String
,
String
>
environment
,
bool
includeParentEnvironment:
true
,
bool
includeParentEnvironment:
true
,
bool
runInShell:
false
,
bool
runInShell:
false
,
Encoding
stdoutEncoding:
systemEncoding
,
Encoding
stdoutEncoding:
SYSTEM_ENCODING
,
// ignore: deprecated_member_use
Encoding
stderrEncoding:
systemEncoding
,
Encoding
stderrEncoding:
SYSTEM_ENCODING
,
// ignore: deprecated_member_use
})
async
{
})
async
{
return
new
ProcessResult
(
0
,
0
,
'1234
\n
5678
\n
5'
,
''
);
return
new
ProcessResult
(
0
,
0
,
'1234
\n
5678
\n
5'
,
''
);
}
}
...
...
packages/flutter_tools/test/dart/pub_get_test.dart
View file @
d820e5f3
...
@@ -164,7 +164,7 @@ class MockProcessManager implements ProcessManager {
...
@@ -164,7 +164,7 @@ class MockProcessManager implements ProcessManager {
Map
<
String
,
String
>
environment
,
Map
<
String
,
String
>
environment
,
bool
includeParentEnvironment:
true
,
bool
includeParentEnvironment:
true
,
bool
runInShell:
false
,
bool
runInShell:
false
,
ProcessStartMode
mode:
ProcessStartMode
.
normal
,
ProcessStartMode
mode:
ProcessStartMode
.
NORMAL
,
// ignore: deprecated_member_use
})
{
})
{
lastPubEnvironment
=
environment
[
'PUB_ENVIRONMENT'
];
lastPubEnvironment
=
environment
[
'PUB_ENVIRONMENT'
];
lastPubCache
=
environment
[
'PUB_CACHE'
];
lastPubCache
=
environment
[
'PUB_CACHE'
];
...
@@ -237,7 +237,7 @@ class MockFileSystem extends ForwardingFileSystem {
...
@@ -237,7 +237,7 @@ class MockFileSystem extends ForwardingFileSystem {
class
MockFile
implements
File
{
class
MockFile
implements
File
{
@override
@override
Future
<
RandomAccessFile
>
open
({
FileMode
mode:
FileMode
.
read
})
async
{
Future
<
RandomAccessFile
>
open
({
FileMode
mode:
FileMode
.
READ
})
async
{
// ignore: deprecated_member_use
return
new
MockRandomAccessFile
();
return
new
MockRandomAccessFile
();
}
}
...
...
packages/flutter_tools/test/devfs_test.dart
View file @
d820e5f3
...
@@ -388,11 +388,11 @@ class MockVMService extends BasicMock implements VMService {
...
@@ -388,11 +388,11 @@ class MockVMService extends BasicMock implements VMService {
Future
<
Null
>
setUp
()
async
{
Future
<
Null
>
setUp
()
async
{
try
{
try
{
_server
=
await
HttpServer
.
bind
(
InternetAddress
.
loopbackIPv6
,
0
);
_server
=
await
HttpServer
.
bind
(
InternetAddress
.
LOOPBACK_IP_V6
,
0
);
// ignore: deprecated_member_use
_httpAddress
=
Uri
.
parse
(
'http://[::1]:
${_server.port}
'
);
_httpAddress
=
Uri
.
parse
(
'http://[::1]:
${_server.port}
'
);
}
on
SocketException
{
}
on
SocketException
{
// Fall back to IPv4 if the host doesn't support binding to IPv6 localhost
// Fall back to IPv4 if the host doesn't support binding to IPv6 localhost
_server
=
await
HttpServer
.
bind
(
InternetAddress
.
loopbackIPv4
,
0
);
_server
=
await
HttpServer
.
bind
(
InternetAddress
.
LOOPBACK_IP_V4
,
0
);
// ignore: deprecated_member_use
_httpAddress
=
Uri
.
parse
(
'http://127.0.0.1:
${_server.port}
'
);
_httpAddress
=
Uri
.
parse
(
'http://127.0.0.1:
${_server.port}
'
);
}
}
_server
.
listen
((
HttpRequest
request
)
{
_server
.
listen
((
HttpRequest
request
)
{
...
...
packages/flutter_tools/test/src/mocks.dart
View file @
d820e5f3
...
@@ -122,7 +122,7 @@ class MockProcessManager implements ProcessManager {
...
@@ -122,7 +122,7 @@ class MockProcessManager implements ProcessManager {
Map
<
String
,
String
>
environment
,
Map
<
String
,
String
>
environment
,
bool
includeParentEnvironment:
true
,
bool
includeParentEnvironment:
true
,
bool
runInShell:
false
,
bool
runInShell:
false
,
ProcessStartMode
mode:
ProcessStartMode
.
normal
,
ProcessStartMode
mode:
ProcessStartMode
.
NORMAL
,
// ignore: deprecated_member_use
})
{
})
{
if
(!
succeed
)
{
if
(!
succeed
)
{
final
String
executable
=
command
[
0
];
final
String
executable
=
command
[
0
];
...
...
packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart
View file @
d820e5f3
...
@@ -13,9 +13,9 @@ import 'common/network.dart';
...
@@ -13,9 +13,9 @@ import 'common/network.dart';
import
'dart/dart_vm.dart'
;
import
'dart/dart_vm.dart'
;
import
'runners/ssh_command_runner.dart'
;
import
'runners/ssh_command_runner.dart'
;
final
String
_ipv4Loopback
=
InternetAddress
.
loopbackIPv4
.
address
;
final
String
_ipv4Loopback
=
InternetAddress
.
LOOPBACK_IP_V4
.
address
;
// ignore: deprecated_member_use
final
String
_ipv6Loopback
=
InternetAddress
.
loopbackIPv6
.
address
;
final
String
_ipv6Loopback
=
InternetAddress
.
LOOPBACK_IP_V6
.
address
;
// ignore: deprecated_member_use
const
ProcessManager
_processManager
=
const
LocalProcessManager
();
const
ProcessManager
_processManager
=
const
LocalProcessManager
();
...
...
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