Fix VisualStudioSettingsOptionPersister issues and increase test coverage#67064
Merged
Conversation
d3ffef1 to
c1560df
Compare
sharwell
reviewed
Mar 1, 2023
sharwell
reviewed
Mar 1, 2023
…GlobalOptionsTest.cs Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
… VSOptionStorage
sharwell
reviewed
Mar 1, 2023
sharwell
reviewed
Mar 1, 2023
sharwell
reviewed
Mar 1, 2023
Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
sharwell
reviewed
Mar 1, 2023
sharwell
reviewed
Mar 1, 2023
sharwell
approved these changes
Mar 1, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a couple of issues, hardens the implementation and adds more test coverage.
The first issue is that when reading fallback option flags we have not used the default values for flags that were not stored in the VS settings storage if there was at least one flag that was stored. As a result these flags defaulted to 0, which was incorrect for new lines after braces options.
The second issue occurred when VS settings manager sync'd options from online storage and triggered option change event. We read incorrect value of the option (individual bool flag, instead of combined flag enum) and stored it in the global options, which later resulted in InvalidCastException.
Fixes AB#1751694.
Fixes AB#1743163.
Fixes AB#1733803