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
958d2a6f
Commit
958d2a6f
authored
Nov 10, 2016
by
John McCutchan
Committed by
GitHub
Nov 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Abort a hot reload if we detect an error in flutter.yaml (#6787)
parent
b9c38711
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
+22
-11
asset.dart
packages/flutter_tools/lib/src/asset.dart
+10
-8
hot.dart
packages/flutter_tools/lib/src/hot.dart
+4
-2
services.dart
packages/flutter_tools/lib/src/services.dart
+8
-1
No files found.
packages/flutter_tools/lib/src/asset.dart
View file @
958d2a6f
...
...
@@ -75,7 +75,14 @@ class AssetBundle {
})
async
{
workingDirPath
??=
getAssetBuildDirectory
();
packagesPath
??=
path
.
absolute
(
PackageMap
.
globalPackagesPath
);
Object
manifest
=
_loadFlutterYamlManifest
(
manifestPath
);
Object
manifest
;
try
{
manifest
=
_loadFlutterYamlManifest
(
manifestPath
);
}
catch
(
e
)
{
printStatus
(
'Error detected in flutter.yaml:'
,
emphasis:
true
);
printError
(
e
);
return
1
;
}
if
(
manifest
==
null
)
{
// No manifest file found for this application.
return
0
;
...
...
@@ -449,13 +456,8 @@ Future<int> _validateFlutterYamlManifest(Object manifest) async {
if
(
validator
.
validate
(
manifest
))
{
return
0
;
}
else
{
if
(
validator
.
errors
.
length
==
1
)
{
printError
(
'Error in flutter.yaml:
${validator.errors.first}
'
);
}
else
{
printError
(
'Error in flutter.yaml:'
);
printError
(
' '
+
validator
.
errors
.
join
(
'
\n
'
));
}
printStatus
(
'Error detected in flutter.yaml:'
,
emphasis:
true
);
printError
(
validator
.
errors
.
join
(
'
\n
'
));
return
1
;
}
}
packages/flutter_tools/lib/src/hot.dart
View file @
958d2a6f
...
...
@@ -387,12 +387,14 @@ class HotRunner extends ResidentRunner {
// Did not update DevFS because of a Dart source error.
return
false
;
}
Status
devFSStatus
=
logger
.
startProgress
(
'Syncing files to device...'
);
final
bool
rebuildBundle
=
bundle
.
needsBuild
();
if
(
rebuildBundle
)
{
printTrace
(
'Updating assets'
);
await
bundle
.
build
();
int
result
=
await
bundle
.
build
();
if
(
result
!=
0
)
return
false
;
}
Status
devFSStatus
=
logger
.
startProgress
(
'Syncing files to device...'
);
await
_devFS
.
update
(
progressReporter:
progressReporter
,
bundle:
bundle
,
bundleDirty:
rebuildBundle
,
...
...
packages/flutter_tools/lib/src/services.dart
View file @
958d2a6f
...
...
@@ -36,7 +36,14 @@ Future<Null> parseServiceConfigs(
return
;
}
dynamic
manifest
=
_loadYamlFile
(
_kFlutterManifestPath
);
dynamic
manifest
;
try
{
manifest
=
_loadYamlFile
(
_kFlutterManifestPath
);
}
catch
(
e
)
{
printStatus
(
'Error detected in flutter.yaml:'
,
emphasis:
true
);
printError
(
e
);
return
;
}
if
(
manifest
==
null
||
manifest
[
'services'
]
==
null
)
{
printTrace
(
'No services specified in the manifest'
);
return
;
...
...
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