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
9ba60786
Commit
9ba60786
authored
Jan 24, 2017
by
Todd Volkert
Committed by
GitHub
Jan 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to package:process v1.0.1 (#7607)
parent
a3a70c6b
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
44 additions
and
44 deletions
+44
-44
android_device.dart
packages/flutter_tools/lib/src/android/android_device.dart
+1
-2
android_workflow.dart
packages/flutter_tools/lib/src/android/android_workflow.dart
+1
-1
os.dart
packages/flutter_tools/lib/src/base/os.dart
+3
-3
process.dart
packages/flutter_tools/lib/src/base/process.dart
+8
-13
analyze_continuously.dart
.../flutter_tools/lib/src/commands/analyze_continuously.dart
+9
-4
test.dart
packages/flutter_tools/lib/src/commands/test.dart
+2
-1
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+1
-1
simulators.dart
packages/flutter_tools/lib/src/ios/simulators.dart
+3
-3
flutter_platform.dart
packages/flutter_tools/lib/src/test/flutter_platform.dart
+8
-8
version.dart
packages/flutter_tools/lib/src/version.dart
+5
-5
pubspec.yaml
packages/flutter_tools/pubspec.yaml
+2
-2
common.dart
packages/flutter_tools/test/src/common.dart
+1
-1
No files found.
packages/flutter_tools/lib/src/android/android_device.dart
View file @
9ba60786
...
...
@@ -62,8 +62,7 @@ class AndroidDevice extends Device {
// We pass an encoding of LATIN1 so that we don't try and interpret the
// `adb shell getprop` result as UTF8.
ProcessResult
result
=
processManager
.
runSync
(
propCommand
.
first
,
propCommand
.
sublist
(
1
),
propCommand
,
stdoutEncoding:
LATIN1
);
if
(
result
.
exitCode
==
0
)
{
...
...
packages/flutter_tools/lib/src/android/android_workflow.dart
View file @
9ba60786
...
...
@@ -71,7 +71,7 @@ class AndroidWorkflow extends DoctorValidator implements Workflow {
try
{
printTrace
(
'java -version'
);
ProcessResult
result
=
processManager
.
runSync
(
'java'
,
<
String
>[
'-version'
]);
ProcessResult
result
=
processManager
.
runSync
(
<
String
>[
'java'
,
'-version'
]);
if
(
result
.
exitCode
==
0
)
{
javaVersion
=
result
.
stderr
;
List
<
String
>
versionLines
=
javaVersion
.
split
(
'
\n
'
);
...
...
packages/flutter_tools/lib/src/base/os.dart
View file @
9ba60786
...
...
@@ -51,14 +51,14 @@ class _PosixUtils extends OperatingSystemUtils {
@override
ProcessResult
makeExecutable
(
File
file
)
{
return
processManager
.
runSync
(
'chmod'
,
<
String
>[
'a+x'
,
file
.
path
]);
return
processManager
.
runSync
(
<
String
>[
'chmod'
,
'a+x'
,
file
.
path
]);
}
/// Return the path to the given executable, or `null` if `which` was not able
/// to locate the binary.
@override
File
which
(
String
execName
)
{
ProcessResult
result
=
processManager
.
runSync
(
'which'
,
<
String
>[
execName
]);
ProcessResult
result
=
processManager
.
runSync
(
<
String
>[
'which'
,
execName
]);
if
(
result
.
exitCode
!=
0
)
return
null
;
String
path
=
result
.
stdout
.
trim
().
split
(
'
\n
'
).
first
.
trim
();
...
...
@@ -89,7 +89,7 @@ class _WindowsUtils extends OperatingSystemUtils {
@override
File
which
(
String
execName
)
{
ProcessResult
result
=
processManager
.
runSync
(
'where'
,
<
String
>[
execName
]);
ProcessResult
result
=
processManager
.
runSync
(
<
String
>[
'where'
,
execName
]);
if
(
result
.
exitCode
!=
0
)
return
null
;
return
fs
.
file
(
result
.
stdout
.
trim
().
split
(
'
\n
'
).
first
.
trim
());
...
...
packages/flutter_tools/lib/src/base/process.dart
View file @
9ba60786
...
...
@@ -54,11 +54,8 @@ Future<Process> runCommand(List<String> cmd, {
Map
<
String
,
String
>
environment
})
async
{
_traceCommand
(
cmd
,
workingDirectory:
workingDirectory
);
String
executable
=
cmd
[
0
];
List
<
String
>
arguments
=
cmd
.
length
>
1
?
cmd
.
sublist
(
1
)
:
<
String
>[];
Process
process
=
await
processManager
.
start
(
executable
,
arguments
,
cmd
,
workingDirectory:
workingDirectory
,
environment:
_environment
(
allowReentrantFlutter
,
environment
)
);
...
...
@@ -127,8 +124,8 @@ Future<Null> runAndKill(List<String> cmd, Duration timeout) {
Future
<
Process
>
runDetached
(
List
<
String
>
cmd
)
{
_traceCommand
(
cmd
);
Future
<
Process
>
proc
=
processManager
.
start
(
cmd
[
0
],
cmd
.
getRange
(
1
,
cmd
.
length
).
toList
()
,
mode:
ProcessStartMode
.
DETACHED
cmd
,
mode:
ProcessStartMode
.
DETACHED
,
);
return
proc
;
}
...
...
@@ -139,10 +136,9 @@ Future<RunResult> runAsync(List<String> cmd, {
})
async
{
_traceCommand
(
cmd
,
workingDirectory:
workingDirectory
);
ProcessResult
results
=
await
processManager
.
run
(
cmd
[
0
],
cmd
.
getRange
(
1
,
cmd
.
length
).
toList
(),
cmd
,
workingDirectory:
workingDirectory
,
environment:
_environment
(
allowReentrantFlutter
)
environment:
_environment
(
allowReentrantFlutter
)
,
);
RunResult
runResults
=
new
RunResult
(
results
);
printTrace
(
runResults
.
toString
());
...
...
@@ -152,7 +148,7 @@ Future<RunResult> runAsync(List<String> cmd, {
bool
exitsHappy
(
List
<
String
>
cli
)
{
_traceCommand
(
cli
);
try
{
return
processManager
.
runSync
(
cli
.
first
,
cli
.
sublist
(
1
)
).
exitCode
==
0
;
return
processManager
.
runSync
(
cli
).
exitCode
==
0
;
}
catch
(
error
)
{
return
false
;
}
...
...
@@ -216,10 +212,9 @@ String _runWithLoggingSync(List<String> cmd, {
})
{
_traceCommand
(
cmd
,
workingDirectory:
workingDirectory
);
ProcessResult
results
=
processManager
.
runSync
(
cmd
[
0
],
cmd
.
getRange
(
1
,
cmd
.
length
).
toList
(),
cmd
,
workingDirectory:
workingDirectory
,
environment:
_environment
(
allowReentrantFlutter
)
environment:
_environment
(
allowReentrantFlutter
)
,
);
printTrace
(
'Exit code
${results.exitCode}
from:
${cmd.join(' ')}
'
);
...
...
packages/flutter_tools/lib/src/commands/analyze_continuously.dart
View file @
9ba60786
...
...
@@ -158,10 +158,15 @@ class AnalysisServer {
Future
<
Null
>
start
()
async
{
String
snapshot
=
path
.
join
(
sdk
,
'bin/snapshots/analysis_server.dart.snapshot'
);
List
<
String
>
args
=
<
String
>[
snapshot
,
'--sdk'
,
sdk
];
printTrace
(
'dart
${args.join(' ')}
'
);
_process
=
await
processManager
.
start
(
path
.
join
(
dartSdkPath
,
'bin'
,
'dart'
),
args
);
List
<
String
>
command
=
<
String
>[
path
.
join
(
dartSdkPath
,
'bin'
,
'dart'
),
snapshot
,
'--sdk'
,
sdk
,
];
printTrace
(
'dart
${command.skip(1).join(' ')}
'
);
_process
=
await
processManager
.
start
(
command
);
_process
.
exitCode
.
whenComplete
(()
=>
_process
=
null
);
Stream
<
String
>
errorStream
=
_process
.
stderr
.
transform
(
UTF8
.
decoder
).
transform
(
const
LineSplitter
());
...
...
packages/flutter_tools/lib/src/commands/test.dart
View file @
9ba60786
...
...
@@ -139,7 +139,8 @@ class TestCommand extends FlutterCommand {
Directory
tempDir
=
fs
.
systemTempDirectory
.
createTempSync
(
'flutter_tools'
);
try
{
File
sourceFile
=
coverageFile
.
copySync
(
path
.
join
(
tempDir
.
path
,
'lcov.source.info'
));
ProcessResult
result
=
processManager
.
runSync
(
'lcov'
,
<
String
>[
ProcessResult
result
=
processManager
.
runSync
(<
String
>[
'lcov'
,
'--add-tracefile'
,
baseCoverageData
,
'--add-tracefile'
,
sourceFile
.
path
,
'--output-file'
,
coverageFile
.
path
,
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
9ba60786
...
...
@@ -41,7 +41,7 @@ class XCode {
}
else
{
try
{
printTrace
(
'xcrun clang'
);
ProcessResult
result
=
processManager
.
runSync
(
'/usr/bin/xcrun'
,
<
String
>[
'clang'
]);
ProcessResult
result
=
processManager
.
runSync
(
<
String
>[
'/usr/bin/xcrun'
,
'clang'
]);
if
(
result
.
stdout
!=
null
&&
result
.
stdout
.
contains
(
'license'
))
_eulaSigned
=
false
;
...
...
packages/flutter_tools/lib/src/ios/simulators.dart
View file @
9ba60786
...
...
@@ -190,9 +190,9 @@ class SimControl {
// },
// "pairs": { ... },
List
<
String
>
args
=
<
String
>[
'simctl'
,
'list'
,
'--json'
,
section
.
name
];
printTrace
(
'
$_xcrunPath
${args.join(' ')}
'
);
ProcessResult
results
=
processManager
.
runSync
(
_xcrunPath
,
args
);
List
<
String
>
command
=
<
String
>[
_xcrunPath
,
'simctl'
,
'list'
,
'--json'
,
section
.
name
];
printTrace
(
command
.
join
(
' '
)
);
ProcessResult
results
=
processManager
.
runSync
(
command
);
if
(
results
.
exitCode
!=
0
)
{
printError
(
'Error executing simctl:
${results.exitCode}
\n
${results.stderr}
'
);
return
<
String
,
Map
<
String
,
dynamic
>>{};
...
...
packages/flutter_tools/lib/src/test/flutter_platform.dart
View file @
9ba60786
...
...
@@ -427,7 +427,7 @@ void main() {
})
{
assert
(
executable
!=
null
);
// Please provide the path to the shell in the SKY_SHELL environment variable.
assert
(!
startPaused
||
enableObservatory
);
List
<
String
>
arguments
=
<
String
>[
];
List
<
String
>
command
=
<
String
>[
executable
];
if
(
enableObservatory
)
{
// Some systems drive the _FlutterPlatform class in an unusual way, where
// only one test file is processed at a time, and the operating
...
...
@@ -439,27 +439,27 @@ void main() {
// I mention this only so that you won't be tempted, as I was, to apply
// the obvious simplification to this code and remove this entire feature.
if
(
observatoryPort
!=
null
)
arguments
.
add
(
'--observatory-port=
$observatoryPort
'
);
command
.
add
(
'--observatory-port=
$observatoryPort
'
);
if
(
diagnosticPort
!=
null
)
arguments
.
add
(
'--diagnostic-port=
$diagnosticPort
'
);
command
.
add
(
'--diagnostic-port=
$diagnosticPort
'
);
if
(
startPaused
)
arguments
.
add
(
'--start-paused'
);
command
.
add
(
'--start-paused'
);
}
else
{
arguments
.
addAll
(<
String
>[
'--disable-observatory'
,
'--disable-diagnostic'
]);
command
.
addAll
(<
String
>[
'--disable-observatory'
,
'--disable-diagnostic'
]);
}
arguments
.
addAll
(<
String
>[
command
.
addAll
(<
String
>[
'--enable-dart-profiling'
,
'--non-interactive'
,
'--enable-checked-mode'
,
'--packages=
$packages
'
,
testPath
,
]);
printTrace
(
'
$executable
${arguments.join(' ')}
'
);
printTrace
(
command
.
join
(
' '
)
);
Map
<
String
,
String
>
environment
=
<
String
,
String
>{
'FLUTTER_TEST'
:
'true'
,
'FONTCONFIG_FILE'
:
_fontConfigFile
.
path
,
};
return
processManager
.
start
(
executable
,
arguments
,
environment:
environment
);
return
processManager
.
start
(
command
,
environment:
environment
);
}
String
get
observatoryPortString
=>
'Observatory listening on http://
${_kHost.address}
:'
;
...
...
packages/flutter_tools/lib/src/version.dart
View file @
9ba60786
...
...
@@ -74,7 +74,7 @@ class FlutterVersion {
/// A date String describing the last framework commit.
static
String
get
frameworkCommitDate
{
return
_runSync
(
'git'
,
<
String
>[
'log'
,
'-n'
,
'1'
,
'--pretty=format:%ad'
,
'--date=format:%Y-%m-%d %H:%M:%S'
],
Cache
.
flutterRoot
);
return
_runSync
(
<
String
>[
'git'
,
'log'
,
'-n'
,
'1'
,
'--pretty=format:%ad'
,
'--date=format:%Y-%m-%d %H:%M:%S'
],
Cache
.
flutterRoot
);
}
static
FlutterVersion
getVersion
([
String
flutterRoot
])
{
...
...
@@ -85,10 +85,10 @@ class FlutterVersion {
static
String
getVersionString
({
bool
whitelistBranchName:
false
})
{
final
String
cwd
=
Cache
.
flutterRoot
;
String
commit
=
_shortGitRevision
(
_runSync
(
'git'
,
<
String
>[
'rev-parse'
,
'HEAD'
],
cwd
));
String
commit
=
_shortGitRevision
(
_runSync
(
<
String
>[
'git'
,
'rev-parse'
,
'HEAD'
],
cwd
));
commit
=
commit
.
isEmpty
?
'unknown'
:
commit
;
String
branch
=
_runSync
(
'git'
,
<
String
>[
'rev-parse'
,
'--abbrev-ref'
,
'HEAD'
],
cwd
);
String
branch
=
_runSync
(
<
String
>[
'git'
,
'rev-parse'
,
'--abbrev-ref'
,
'HEAD'
],
cwd
);
branch
=
branch
==
'HEAD'
?
'master'
:
branch
;
if
(
whitelistBranchName
||
branch
.
isEmpty
)
{
...
...
@@ -101,8 +101,8 @@ class FlutterVersion {
}
}
String
_runSync
(
String
executable
,
List
<
String
>
arguments
,
String
cwd
)
{
ProcessResult
results
=
processManager
.
runSync
(
executable
,
arguments
,
workingDirectory:
cwd
);
String
_runSync
(
List
<
String
>
command
,
String
cwd
)
{
ProcessResult
results
=
processManager
.
runSync
(
command
,
workingDirectory:
cwd
);
return
results
.
exitCode
==
0
?
results
.
stdout
.
trim
()
:
''
;
}
...
...
packages/flutter_tools/pubspec.yaml
View file @
9ba60786
...
...
@@ -17,12 +17,12 @@ dependencies:
intl
:
'
>=0.14.0
<0.15.0'
json_rpc_2
:
^2.0.0
json_schema
:
1.0.6
linter
:
0.1.30-alpha.1
linter
:
0.1.30-alpha.1
meta
:
^1.0.4
mustache
:
^0.2.5
package_config
:
'
>=0.1.5
<2.0.0'
path
:
^1.4.0
process
:
1.0.
0
process
:
1.0.
1
pub_semver
:
^1.0.0
stack_trace
:
^1.4.0
usage
:
^2.2.1
...
...
packages/flutter_tools/test/src/common.dart
View file @
9ba60786
...
...
@@ -29,5 +29,5 @@ void updateFileModificationTime(String path,
'
${modificationTime.minute.toString().padLeft(2, "0")}
'
'.
${modificationTime.second.toString().padLeft(2, "0")}
'
;
ProcessManager
processManager
=
context
[
ProcessManager
];
processManager
.
runSync
(
'touch'
,
<
String
>[
'-t'
,
argument
,
path
]);
processManager
.
runSync
(
<
String
>[
'touch'
,
'-t'
,
argument
,
path
]);
}
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