Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@ private void WriteState(State state, SolutionServices solutionServices)
Volatile.Write(ref _stateDoNotAccessDirectly, state);
}

public bool HasCompilation
{
get
{
var state = this.ReadState();
return state.CompilationWithoutGeneratedDocuments != null && state.CompilationWithoutGeneratedDocuments.TryGetValue(out _) || state.DeclarationOnlyCompilation != null;
}
}

public bool ContainsAssemblyOrModuleOrDynamic(ISymbol symbol, bool primary)
{
Debug.Assert(symbol.Kind == SymbolKind.Assembly ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public GeneratedFileReplacingCompilationTracker(ICompilationTracker underlyingTr
_replacedGeneratedDocumentState = replacementDocumentState;
}

public bool HasCompilation => _underlyingTracker.HasCompilation;

public ProjectState ProjectState => _underlyingTracker.ProjectState;

public bool ContainsAssemblyOrModuleOrDynamic(ISymbol symbol, bool primary)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@ internal partial class SolutionState
{
private interface ICompilationTracker
{
/// <summary>
/// Returns true if this tracker currently either points to a compilation, has an in-progress
/// compilation being computed, or has a skeleton reference. Note: this is simply a weak
/// statement about the tracker at this exact moment in time. Immediately after this returns
/// the tracker might change and may no longer have a final compilation (for example, if the
/// retainer let go of it) or might not have an in-progress compilation (for example, if the
/// background compiler finished with it).
///
/// Because of the above limitations, this should only be used by clients as a weak form of
/// information about the tracker. For example, a client may see that a tracker has no
/// compilation and may choose to throw it away knowing that it could be reconstructed at a
/// later point if necessary.
/// </summary>
bool HasCompilation { get; }
ProjectState ProjectState { get; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1586,14 +1586,7 @@ private ImmutableDictionary<ProjectId, ICompilationTracker> CreateCompilationTra
IEnumerable<ProjectId>? dependencies = null;

foreach (var (id, tracker) in _projectIdToTrackerMap)
{
if (!tracker.HasCompilation)
{
continue;
}

builder.Add(id, CanReuse(id) ? tracker : tracker.Fork(tracker.ProjectState));
}

return builder.ToImmutable();

Expand Down