-
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
Remove OOP related feature options. #31644
Conversation
public static readonly Option<bool> SymbolFinderEnabled = new Option<bool>( | ||
nameof(RemoteFeatureOptions), nameof(SymbolFinderEnabled), defaultValue: true, | ||
storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + nameof(SymbolFinderEnabled))); | ||
|
||
public static readonly Option<bool> DiagnosticsEnabled = new Option<bool>( | ||
nameof(RemoteFeatureOptions), nameof(DiagnosticsEnabled), defaultValue: true, | ||
storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + nameof(DiagnosticsEnabled))); |
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.
this option is still around since some tests explicitly set this to false as diagnostics doesn't work OOP in tests (not sure why, but i'm just preserving that behavior).
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.
@heejaechang Do you know why diagnostics can't run OOP during tests? The relevant check that forces us to keep this is here:
roslyn/src/EditorFeatures/TestUtilities/CodeActions/AbstractCodeActionOrUserDiagnosticTest.cs
Lines 375 to 379 in f79608d
using (var workspace = CreateWorkspaceFromOptions(initialMarkup, parameters)) | |
{ | |
// Currently, OOP diagnostics don't work with code action tests. | |
workspace.Options = workspace.Options.WithChangedOption( | |
RemoteFeatureOptions.DiagnosticsEnabled, 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.
test doesn't have OOP. you need to explicitly set up mock remote host to simulate OOP in unit test which I do for VS.Net unit test but nowhere else.
Tagging @sharwell @jinujoseph @dotnet/roslyn-ide |
.WithChangedOption(RemoteFeatureOptions.OutOfProcessAllowed, outOfProcess) | ||
.WithChangedOption(RemoteFeatureOptions.AddImportEnabled, outOfProcess); | ||
|
||
workspace.Options = workspace.Options.WithChangedOption(RemoteHostOptions.RemoteHostTest, outOfProcess); |
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.
note: these features fallback to running proc if the oop server doesn't launch. So it's till good to ahve tests that validate they work properly both in proc and out of proc.
@heejaechang ,can we rerun the val build again now that the insertion is done |
|
||
return workspace.TryGetRemoteHostClientAsync(cancellationToken); | ||
} | ||
=> workspace.Options.GetOption(featureOption); |
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.
not sure why we still have this option.
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.
You're right. Removed. Thanks! :)
|
||
public static bool AnyFeatureRunsInProcess(Workspace workspace) | ||
=> AllFeatureOptions.Any(o => !workspace.IsOutOfProcessEnabled(o)); | ||
|
||
public static bool ShouldComputeIndex(Workspace workspace) |
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.
not sure why we still need this.
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.
This is still necessary because computing the index should only happen in certain workspaces. i.e. we do not want to generate the indices in the VS workspaces. But we do want them in the remote workspace :) Thanks!
@sharwell there seems to have been no movement there for like 6 months :) |
We're going to review the three approaches in design meeting today and move one forward. |
Ah. Good to know. Feel free to close this out if you prefer another approach. I didn't realize this was something being worked on :) |
Can this be merged in @sharwell @jasonmalinowski ? |
1 similar comment
Can this be merged in @sharwell @jasonmalinowski ? |
@CyrusNajmabadi I believe we are planning to merge #27983 first. If this pull request has other changes we can look into it as a follow-up. |
0a735c8
to
bcb6d00
Compare
@sharwell @jasonmalinowski now that #27983 has gone in, this is all that's left. Plz review and merge when convenient for you. Thanks! |
@sharwell @jasonmalinowski now that #27983 has gone in, this is all that's left. Plz review and merge when convenient for you. Thanks! |
=> forStatementSyntax.Condition == null | ||
? false | ||
: caretPosition > forStatementSyntax.Condition.SpanStart && | ||
caretPosition < forStatementSyntax.Condition.Span.End; |
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.
📝 This change can be reverted (this file is out of scope for the current PR)
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.
@sharwell i was getting a warning that the formatting here was incorrect. I like having 0 warnings locally. So i fixed it up. Otherwise i think you can just get warning fatigue.
@sharwell Feel free to merge when ready. |
ping @sharwell @jinujoseph can we move forward with this? |
@CyrusNajmabadi can you update the title of this PR to reflect the new behavior? |
@sharwell done. |
@sharwell You thumbsupped... but didn't merge :) |
talked with @sharwell and @jinujoseph and I am going to take this. |
Thanks! |
* dotnet/master: (903 commits) Add UseEnhancedColors to FeatureOnOffOptionsProvider (dotnet#33802) Update TypeStyle.cs Text on a InterpolatedVerbatimStringStartToken token (dotnet#33747) added ability to clear all diagnostics reproted from a IDiagnosticUpd… (dotnet#33805) Use a set instead of map to define processed redundant nodes. EnC: Remove dependency on solution from AnalyzeDocumentAsync (dotnet#33796) Add workitem links to new redundant assignment tests. Move leading trivia with node when removing unused values. Remove OOP related feature options. (dotnet#31644) Merge pull request dotnet#33631 from CyrusNajmabadi/wrapPriority Use the correct iteration count in IterationDataAttribute Handle interface members in NullableWalker.AsMemberOfType (dotnet#33764) Cleanly work around microsoft/nodejstools#2138 Implement full spec changes for Index/Range (dotnet#33679) Further reduce expectations on deep fluent calls Lower expectation for deep fluent call Take screenshot after writing logs Avoid throwing exception in static constructor Offer to add parameter to constructor with no existing parameters (dotnet#33624) Add regression test for nullable crash (dotnet#33735) ...
This code to make it possible to run features OOP was added around 18 months ago. Since then there has been no issue with it. It has also been A/B tested with no stability issues arising, and positive numbers for all latency-oriented scenarios.
This PR simply removes the options for controlling this and makes it so that OOP is on all the time.
Fixes #26076