Skip to content
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

Merged
merged 4 commits into from
Mar 1, 2019

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Dec 9, 2018

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

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner December 9, 2018 04:32
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)));
Copy link
Member Author

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).

Copy link
Member Author

@CyrusNajmabadi CyrusNajmabadi Dec 9, 2018

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:

using (var workspace = CreateWorkspaceFromOptions(initialMarkup, parameters))
{
// Currently, OOP diagnostics don't work with code action tests.
workspace.Options = workspace.Options.WithChangedOption(
RemoteFeatureOptions.DiagnosticsEnabled, false);

Copy link
Contributor

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.

@CyrusNajmabadi
Copy link
Member Author

Tagging @sharwell @jinujoseph @dotnet/roslyn-ide

.WithChangedOption(RemoteFeatureOptions.OutOfProcessAllowed, outOfProcess)
.WithChangedOption(RemoteFeatureOptions.AddImportEnabled, outOfProcess);

workspace.Options = workspace.Options.WithChangedOption(RemoteHostOptions.RemoteHostTest, outOfProcess);
Copy link
Member Author

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.

@jcouv jcouv added the Area-IDE label Dec 9, 2018
@jinujoseph jinujoseph added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Dec 10, 2018
@jinujoseph
Copy link
Contributor

@heejaechang ,can we rerun the val build again now that the insertion is done

@jinujoseph jinujoseph added this to the 16.0.P2 milestone Dec 10, 2018

return workspace.TryGetRemoteHostClientAsync(cancellationToken);
}
=> workspace.Options.GetOption(featureOption);
Copy link
Contributor

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.

Copy link
Member Author

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)
Copy link
Contributor

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.

Copy link
Member Author

@CyrusNajmabadi CyrusNajmabadi Dec 10, 2018

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!

@heejaechang
Copy link
Contributor

I had similar PR (#29676) and closed because @sharwell said he has PR with different approach.

@CyrusNajmabadi
Copy link
Member Author

I had similar PR (#29676) and closed because @sharwell said he has PR with different approach.

Not sure what's up then. AFAICT, OOP is still not enabled by default, and the option for the user is still in the product.

@sharwell
Copy link
Member

sharwell commented Dec 10, 2018

Probable duplicate of #27983 or #27985.

@CyrusNajmabadi
Copy link
Member Author

@sharwell there seems to have been no movement there for like 6 months :)

@sharwell
Copy link
Member

We're going to review the three approaches in design meeting today and move one forward.

@CyrusNajmabadi
Copy link
Member Author

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 :)

@CyrusNajmabadi
Copy link
Member Author

Can this be merged in @sharwell @jasonmalinowski ?

1 similar comment
@CyrusNajmabadi
Copy link
Member Author

Can this be merged in @sharwell @jasonmalinowski ?

@sharwell
Copy link
Member

sharwell commented Jan 8, 2019

@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.

@jinujoseph jinujoseph modified the milestones: 16.0.P2, 16.1 Jan 17, 2019
@CyrusNajmabadi CyrusNajmabadi changed the base branch from master to dev16.0.x February 6, 2019 18:55
@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner February 6, 2019 18:55
@CyrusNajmabadi CyrusNajmabadi changed the base branch from dev16.0.x to dev16.1-preview1 February 6, 2019 18:55
@CyrusNajmabadi
Copy link
Member Author

@sharwell @jasonmalinowski now that #27983 has gone in, this is all that's left. Plz review and merge when convenient for you. Thanks!

@RikkiGibson RikkiGibson changed the base branch from dev16.1-preview1 to master February 8, 2019 05:43
@CyrusNajmabadi
Copy link
Member Author

@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;
Copy link
Member

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)

Copy link
Member Author

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.

@CyrusNajmabadi
Copy link
Member Author

@sharwell Feel free to merge when ready.

@CyrusNajmabadi
Copy link
Member Author

ping @sharwell @jinujoseph can we move forward with this?

@sharwell
Copy link
Member

@CyrusNajmabadi can you update the title of this PR to reflect the new behavior?

@CyrusNajmabadi CyrusNajmabadi changed the title Enable OOP features by default. Remove OOP related feature options. Feb 24, 2019
@CyrusNajmabadi
Copy link
Member Author

@sharwell done.

@CyrusNajmabadi
Copy link
Member Author

@sharwell You thumbsupped... but didn't merge :)

@heejaechang
Copy link
Contributor

talked with @sharwell and @jinujoseph and I am going to take this.

@heejaechang heejaechang merged commit 6f5be2e into dotnet:master Mar 1, 2019
@jinujoseph jinujoseph modified the milestones: 16.1, 16.1.P1 Mar 1, 2019
@CyrusNajmabadi
Copy link
Member Author

Thanks!

@CyrusNajmabadi CyrusNajmabadi deleted the enableOop branch March 1, 2019 20:05
333fred added a commit to 333fred/roslyn that referenced this pull request Mar 4, 2019
* 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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants