-
Notifications
You must be signed in to change notification settings - Fork 4.2k
More options refactoring #56089
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
More options refactoring #56089
Conversation
62a66a6 to
f5de977
Compare
4ed616e to
ca74658
Compare
|
@dibarbet @dotnet/roslyn-ide PTAL |
dibarbet
left a comment
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.
had a general overall question when reading through this PR - How do I know when an option should be retrieved (or set) from the IGlobalOptionService vs. the solution options? For example, why are the NavigationOptions solution options and not global ones?
Clearly feature flags are generally global options. Is everything else a solution option? And will I get an error if I try and use a solution option to query the IGlobalOptionService?
Otherwise PR looks good
src/VisualStudio/Core/Def/Implementation/LanguageClient/AlwaysActivateInProcLanguageClient.cs
Outdated
Show resolved
Hide resolved
src/VisualStudio/Core/Def/Implementation/LanguageClient/AlwaysActivateInProcLanguageClient.cs
Outdated
Show resolved
Hide resolved
That's currently a bit of a problem to see. The solution option setter serializes options whose provider is defined in Workspaces or Features layer. Those options are solution options - they are serialized over to OOP. Other options are global options, which are not available in OOP. I'm thinking of introducing marker interfaces IGlobalOptionProvider/ISolutionOptionProvider to make it more explicit. Hopefully, once I'm done with the refactorings it will be clearer. Currently the system is very complex. |
I think that would be good. Is it also possible to mark an |
Unfortunately, not as it is designed today. Options do not know which provider owns them. In theory they can be owned by multiple. |
Read global options (options not serialized to the solution snapshot) directly using IGlobalOptionService rather then via Solution.Options or Workspace.Options.