Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[flutter_tool] Catch a yaml parse failure during project creation #36105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2019
Merged

[flutter_tool] Catch a yaml parse failure during project creation #36105

merged 1 commit into from
Jul 13, 2019

Conversation

zanderso
Copy link
Member

Description

Previously, this resulted in an unhandled exception. Now this will throwToolExit and propagate the parse error from the yaml parser.

Related Issues

#35915

Tests

I added the following tests:

Test in test/project_test.dart.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read [Handling breaking changes]). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

@zanderso zanderso requested a review from jonahwilliams July 12, 2019 22:13
@fluttergithubbot fluttergithubbot added d: examples Sample code and demos c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels. labels Jul 12, 2019
@zanderso zanderso removed the d: examples Sample code and demos label Jul 12, 2019
Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@codecov
Copy link

codecov bot commented Jul 12, 2019

Codecov Report

Merging #36105 into master will decrease coverage by 0.42%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #36105      +/-   ##
==========================================
- Coverage   54.83%    54.4%   -0.43%     
==========================================
  Files         187      187              
  Lines       17150    17153       +3     
==========================================
- Hits         9404     9332      -72     
- Misses       7746     7821      +75
Flag Coverage Δ
#flutter_tool 54.4% <100%> (-0.43%) ⬇️
Impacted Files Coverage Δ
packages/flutter_tools/lib/src/project.dart 82.78% <100%> (+0.17%) ⬆️
...ackages/flutter_tools/lib/src/resident_runner.dart 17.93% <0%> (-16.09%) ⬇️
packages/flutter_tools/lib/src/base/io.dart 70.58% <0%> (-2.95%) ⬇️
packages/flutter_tools/lib/src/version.dart 96.05% <0%> (-1.48%) ⬇️
packages/flutter_tools/lib/src/vmservice.dart 38.81% <0%> (-0.96%) ⬇️
.../flutter_tools/lib/src/fuchsia/fuchsia_device.dart 55.39% <0%> (-0.38%) ⬇️
.../flutter_tools/lib/src/android/android_device.dart 31.63% <0%> (+0.25%) ⬆️
packages/flutter_tools/lib/src/base/process.dart 84.37% <0%> (+0.78%) ⬆️
packages/flutter_tools/lib/src/emulator.dart 70.33% <0%> (+0.84%) ⬆️
...utter_tools/lib/src/commands/shell_completion.dart 81.25% <0%> (+68.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d31c2a...c1375f7. Read the comment docs.

@zanderso zanderso merged commit 13382f4 into flutter:master Jul 13, 2019
@zanderso zanderso deleted the catch-yaml-exn branch July 13, 2019 06:24
tvolkert added a commit that referenced this pull request Jul 19, 2019
flutter/engine#9935 Fix backspace crash on Chinese devices
#36105 Catch a yaml parse failure during project creation
@kf6gpe
Copy link
Contributor

kf6gpe commented Jul 22, 2019

This PR has been merged into a hotfix candidate, 1.7.8+hotfix.4, currently in the beta channel. If it soaks well, we anticipate pushing this to stable soon.

KevinG2011 pushed a commit to pepper-ios/flutter that referenced this pull request Apr 23, 2020
flutter/engine#9935 Fix backspace crash on Chinese devices
flutter#36105 Catch a yaml parse failure during project creation
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants