-
Notifications
You must be signed in to change notification settings - Fork 29.4k
Fix crash on vswhere search from flutter doctor #40263
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
'productMilestoneIsPreRelease': true, | ||
} | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 😀)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Windows/Visual Studio/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done here and in other places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?