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
4cd1fb17
Commit
4cd1fb17
authored
Nov 20, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix analyzer warnings in updater package
This class was renamed to MojoEventSubscription.
parent
ffb95f05
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
analyze.dart
packages/flutter_tools/lib/src/commands/analyze.dart
+7
-1
main.dart
packages/updater/lib/main.dart
+1
-1
pipe_to_file.dart
packages/updater/lib/pipe_to_file.dart
+3
-3
No files found.
packages/flutter_tools/lib/src/commands/analyze.dart
View file @
4cd1fb17
...
@@ -96,6 +96,7 @@ class AnalyzeCommand extends FlutterCommand {
...
@@ -96,6 +96,7 @@ class AnalyzeCommand extends FlutterCommand {
pubSpecDirectories
.
add
(
flutterDir
.
path
);
pubSpecDirectories
.
add
(
flutterDir
.
path
);
// .../packages/*/bin/*.dart
// .../packages/*/bin/*.dart
// .../packages/*/lib/main.dart
Directory
packages
=
new
Directory
(
path
.
join
(
ArtifactStore
.
flutterRoot
,
'packages'
));
Directory
packages
=
new
Directory
(
path
.
join
(
ArtifactStore
.
flutterRoot
,
'packages'
));
for
(
FileSystemEntity
entry
in
packages
.
listSync
())
{
for
(
FileSystemEntity
entry
in
packages
.
listSync
())
{
if
(
entry
is
Directory
)
{
if
(
entry
is
Directory
)
{
...
@@ -109,6 +110,11 @@ class AnalyzeCommand extends FlutterCommand {
...
@@ -109,6 +110,11 @@ class AnalyzeCommand extends FlutterCommand {
}
}
}
}
}
}
String
mainPath
=
path
.
join
(
entry
.
path
,
'lib'
,
'main.dart'
);
if
(
FileSystemEntity
.
isFileSync
(
mainPath
))
{
dartFiles
.
add
(
mainPath
);
foundOne
=
true
;
}
if
(
foundOne
)
if
(
foundOne
)
pubSpecDirectories
.
add
(
entry
.
path
);
pubSpecDirectories
.
add
(
entry
.
path
);
}
}
...
@@ -298,4 +304,4 @@ class AnalyzeCommand extends FlutterCommand {
...
@@ -298,4 +304,4 @@ class AnalyzeCommand extends FlutterCommand {
print
(
'No analyzer warnings!'
);
print
(
'No analyzer warnings!'
);
return
0
;
return
0
;
}
}
}
}
\ No newline at end of file
packages/updater/lib/main.dart
View file @
4cd1fb17
...
@@ -83,7 +83,7 @@ class UpdateTask {
...
@@ -83,7 +83,7 @@ class UpdateTask {
Future
<
yaml
.
YamlMap
>
_fetchManifest
()
async
{
Future
<
yaml
.
YamlMap
>
_fetchManifest
()
async
{
String
manifestUrl
=
_currentManifest
[
'update-url'
]
+
'/'
+
kManifestFile
;
String
manifestUrl
=
_currentManifest
[
'update-url'
]
+
'/'
+
kManifestFile
;
String
manifestData
=
await
http
.
get
(
manifestUrl
)
;
String
manifestData
=
(
await
http
.
get
(
manifestUrl
)).
body
;
return
yaml
.
loadYaml
(
manifestData
,
sourceUrl:
manifestUrl
);
return
yaml
.
loadYaml
(
manifestData
,
sourceUrl:
manifestUrl
);
}
}
...
...
packages/updater/lib/pipe_to_file.dart
View file @
4cd1fb17
...
@@ -11,11 +11,11 @@ import 'package:mojo/core.dart';
...
@@ -11,11 +11,11 @@ import 'package:mojo/core.dart';
// Helper class to drain the contents of a mojo data pipe to a file.
// Helper class to drain the contents of a mojo data pipe to a file.
class
PipeToFile
{
class
PipeToFile
{
MojoDataPipeConsumer
_consumer
;
MojoDataPipeConsumer
_consumer
;
MojoEventS
tream
_eventStream
;
MojoEventS
ubscription
_eventStream
;
IOSink
_outputStream
;
IOSink
_outputStream
;
PipeToFile
(
this
.
_consumer
,
String
outputPath
)
{
PipeToFile
(
this
.
_consumer
,
String
outputPath
)
{
_eventStream
=
new
MojoEventS
tream
(
_consumer
.
handle
);
_eventStream
=
new
MojoEventS
ubscription
(
_consumer
.
handle
);
_outputStream
=
new
File
(
outputPath
).
openWrite
();
_outputStream
=
new
File
(
outputPath
).
openWrite
();
}
}
...
@@ -33,7 +33,7 @@ class PipeToFile {
...
@@ -33,7 +33,7 @@ class PipeToFile {
Future
drain
()
async
{
Future
drain
()
async
{
Completer
completer
=
new
Completer
();
Completer
completer
=
new
Completer
();
// TODO(mpcomplete): Is it legit to pass an async callback to listen?
// TODO(mpcomplete): Is it legit to pass an async callback to listen?
_eventStream
.
listen
((
List
<
int
>
event
)
async
{
_eventStream
.
subscribe
((
List
<
int
>
event
)
async
{
MojoHandleSignals
mojoSignals
=
new
MojoHandleSignals
(
event
[
1
]);
MojoHandleSignals
mojoSignals
=
new
MojoHandleSignals
(
event
[
1
]);
if
(
mojoSignals
.
isReadable
)
{
if
(
mojoSignals
.
isReadable
)
{
MojoResult
result
=
await
_doRead
();
MojoResult
result
=
await
_doRead
();
...
...
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