-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Options Refactoring - Round 3 #57254
Conversation
25ae09e
to
4a4be51
Compare
9cfbf4b
to
ef03058
Compare
@@ -62,12 +62,6 @@ public int NavigateToDecompiledSources | |||
set { SetBooleanOption(FeatureOnOffOptions.NavigateToDecompiledSources, value); } | |||
} | |||
|
|||
public int UseEnhancedColors |
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.
Thanks for getting this!
public static readonly PerLanguageOption2<bool> EnableInlineDiagnostics = | ||
new(nameof(InlineDiagnosticsOptions), | ||
nameof(EnableInlineDiagnostics), | ||
new("InlineDiagnosticsOptions", |
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.
Why is not good to use nameof()
here? Easier to move options between code files?
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.
Because renaming the internal type might break the option (change the key that's used to look it up). There is really no relationship that we need to maintain between the type that declares the option and the option key.
* upstream/main: (51 commits) Disable sql when built from source Fix Reduce indirections Reduce indirections Rename files Fix nullability warning Update cloud cache in the same way Ensure only one storage service factory gets created per workspace. Remove processed typename check Simplify Equals method Build CodeAction description into table and only generate Dev17 hash Avoid recomputing expensive persistence location data that does not change. Options Refactoring - Round 3 (dotnet#57254) Merge pull request dotnet#57509 from dotnet/dev/rigibson/fix-publishdata Classify method group assignments as methods (dotnet#57410) Simplify NRT Simplify Remove unnecessary workaround code. Simplify ...
More options refactoring applying patterns described in #55728
Introduces attributes
ExportSolutionOptionProvider
andExportGlobalOptionProvider
that derive fromExportOptionProvider
but does not use them yet when importing options. Will follow up on that in a separate PR (issue #42308).Follow-up: #57283