Fix crash on vswhere search from flutter doctor#40263
Fix crash on vswhere search from flutter doctor#40263stuartmorgan-g merged 6 commits intoflutter:masterfrom
Conversation
| 'productMilestoneIsPreRelease': true, | ||
| } | ||
| }; | ||
|
|
There was a problem hiding this comment.
Please add a variant of this (_oldResponse?) that doesn't contain the reboot/complete/launchable entries, and at least one test using them; installationHasIssues still has asserts that the keys are present; we should have a test coverage that would catch that. (And also, please fix that 😀)
stuartmorgan-g
left a comment
There was a problem hiding this comment.
LGTM with the change above
| assert(installationDetails[_isLaunchableKey] != null); | ||
| if (installationDetails[_isCompleteKey] == null || | ||
| installationDetails[_isRebootRequiredKey] == null || | ||
| installationDetails[_isLaunchableKey] == null) { |
There was a problem hiding this comment.
I'd rather we not treat these as a monolithic block, where we don't check them at all if any one is missing. Instead this can be:
if (installationDetails[_isCompleteKey] != null && !installationDetails[_isCompleteKey]) {
return true;
}
[similarly for the others]
return false;
Codecov Report
@@ Coverage Diff @@
## master #40263 +/- ##
=========================================
Coverage ? 58.42%
=========================================
Files ? 192
Lines ? 18539
Branches ? 0
=========================================
Hits ? 10831
Misses ? 7708
Partials ? 0
Continue to review full report at Codecov.
|
| }; | ||
|
|
||
| // A version of a response that doesn't include certain installation status | ||
| // information that might be missing in older Windows versions. |
There was a problem hiding this comment.
s/Windows/Visual Studio/
There was a problem hiding this comment.
Done here and in other places
stuartmorgan-g
left a comment
There was a problem hiding this comment.
LGTM with changes noted above, with the understanding that the potential crashes will be fixed in the other PR ASAP.
Fixes a crash introduced on flutter#40011 due to an incorrect type in the vswhere search Fixes flutter#40238
Description
Fixes a crash introduced on #40011 due to an incorrect type in the vswhere search
Related Issues
Fixes #40238
Tests
Relevant tests in visual_studio_test.dart were updated
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?