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 BackgroundParser and BackgroundCompiler #58453

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sharwell
Copy link
Member

Implements the proposal detailed in #58451

@@ -117,28 +114,12 @@ private static HostServices GetHostServices(ExportProvider? exportProvider = nul

protected internal override bool PartialSemanticsEnabled
{
get { return _backgroundCompiler != null; }
get { return _partialSemanticsEnabled; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is always true?

private readonly TaskQueue _taskQueue;

[SuppressMessage("CodeQuality", "IDE0052:Remove unread private members", Justification = "Used to keep a strong reference to the built compilations so they are not GC'd")]
private Compilation?[]? _mostRecentCompilations;
Copy link
Contributor

@Therzok Therzok Jan 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the purpose of this to have RecoverableValueSource compilation instances rooted here?

I'd imagine that without this code, the Compilation instances would likely be GC'd and recomputed constantly.

See https://sourceroslyn.io/#Microsoft.CodeAnalysis.Workspaces/Workspace/Solution/SolutionState.CompilationTracker.CompilationTrackerState.cs,117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants