Skip to content

Commit 4e8ba1c

Browse files
[automated] Merge branch 'main-vs-deps' => 'release/dev17.15' (#77761)
I detected changes in the main-vs-deps branch which have not been merged yet to release/dev17.15. I'm a robot and am configured to help you automatically keep release/dev17.15 up to date, so I've opened this PR. This PR merges commits made on main-vs-deps by the following committers: * dotnet-policy-service[bot] * CyrusNajmabadi ## Instructions for merging from UI This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, *not* a squash or rebase commit. <img alt="merge button instructions" src="https://i.imgur.com/GepcNJV.png" width="300" /> If this repo does not allow creating merge commits from the GitHub UI, use command line instructions. ## Instructions for merging via command line Run these commands to merge this pull request from the command line. ``` sh git fetch git checkout main-vs-deps git pull --ff-only git checkout release/dev17.15 git pull --ff-only git merge --no-ff main-vs-deps # If there are merge conflicts, resolve them and then run git merge --continue to complete the merge # Pushing the changes to the PR branch will re-trigger PR validation. git push https://github.com/dotnet/roslyn HEAD:merge/main-vs-deps-to-release/dev17.15 ``` <details> <summary>or if you are using SSH</summary> ``` git push git@github.com:dotnet/roslyn HEAD:merge/main-vs-deps-to-release/dev17.15 ``` </details> After PR checks are complete push the branch ``` git push ``` ## Instructions for resolving conflicts :warning: If there are merge conflicts, you will need to resolve them manually before merging. You can do this [using GitHub][resolve-github] or using the [command line][resolve-cli]. [resolve-github]: https://help.github.com/articles/resolving-a-merge-conflict-on-github/ [resolve-cli]: https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/ ## Instructions for updating this pull request Contributors to this repo have permission update this pull request by pushing to the branch 'merge/main-vs-deps-to-release/dev17.15'. This can be done to resolve conflicts or make other changes to this pull request before it is merged. The provided examples assume that the remote is named 'origin'. If you have a different remote name, please replace 'origin' with the name of your remote. ``` git fetch git checkout -b merge/main-vs-deps-to-release/dev17.15 origin/release/dev17.15 git pull https://github.com/dotnet/roslyn merge/main-vs-deps-to-release/dev17.15 (make changes) git commit -m "Updated PR with my changes" git push https://github.com/dotnet/roslyn HEAD:merge/main-vs-deps-to-release/dev17.15 ``` <details> <summary>or if you are using SSH</summary> ``` git fetch git checkout -b merge/main-vs-deps-to-release/dev17.15 origin/release/dev17.15 git pull git@github.com:dotnet/roslyn merge/main-vs-deps-to-release/dev17.15 (make changes) git commit -m "Updated PR with my changes" git push git@github.com:dotnet/roslyn HEAD:merge/main-vs-deps-to-release/dev17.15 ``` </details> Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues. Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1.
2 parents 9191f6e + 1def752 commit 4e8ba1c

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.RegularCompilationTracker.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,14 @@ public bool ContainsAssemblyOrModuleOrDynamic(
118118
return finalState.RootedSymbolSet.ContainsAssemblyOrModuleOrDynamic(symbol, primary, out compilation, out referencedThrough);
119119
}
120120

121+
ICompilationTracker ICompilationTracker.Fork(ProjectState newProjectState, TranslationAction? translate)
122+
=> Fork(newProjectState, translate);
123+
121124
/// <summary>
122125
/// Creates a new instance of the compilation info, retaining any already built
123126
/// compilation state as the now 'old' state
124127
/// </summary>
125-
public ICompilationTracker Fork(
128+
public RegularCompilationTracker Fork(
126129
ProjectState newProjectState,
127130
TranslationAction? translate)
128131
{
@@ -680,7 +683,10 @@ private async Task<bool> HasSuccessfullyLoadedSlowAsync(
680683
return finalState.HasSuccessfullyLoaded;
681684
}
682685

683-
public ICompilationTracker WithCreateCreationPolicy(bool forceRegeneration)
686+
ICompilationTracker ICompilationTracker.WithCreateCreationPolicy(bool forceRegeneration)
687+
=> WithCreateCreationPolicy(forceRegeneration);
688+
689+
public RegularCompilationTracker WithCreateCreationPolicy(bool forceRegeneration)
684690
{
685691
var state = this.ReadState();
686692

@@ -736,7 +742,10 @@ public ICompilationTracker WithCreateCreationPolicy(bool forceRegeneration)
736742
skeletonReferenceCacheToClone: _skeletonReferenceCache);
737743
}
738744

739-
public ICompilationTracker WithDoNotCreateCreationPolicy()
745+
ICompilationTracker ICompilationTracker.WithDoNotCreateCreationPolicy()
746+
=> WithDoNotCreateCreationPolicy();
747+
748+
public RegularCompilationTracker WithDoNotCreateCreationPolicy()
740749
{
741750
var state = this.ReadState();
742751

src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.WithFrozenSourceGeneratedDocumentsCompilationTracker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ private sealed class WithFrozenSourceGeneratedDocumentsCompilationTracker : ICom
3535
[DisallowNull]
3636
private Compilation? _compilationWithReplacements;
3737

38-
public ICompilationTracker UnderlyingTracker { get; }
38+
public RegularCompilationTracker UnderlyingTracker { get; }
3939
public ProjectState ProjectState => UnderlyingTracker.ProjectState;
4040

4141
public GeneratorDriver? GeneratorDriver => UnderlyingTracker.GeneratorDriver;
@@ -46,7 +46,7 @@ private sealed class WithFrozenSourceGeneratedDocumentsCompilationTracker : ICom
4646
private SkeletonReferenceCache _skeletonReferenceCache;
4747

4848
public WithFrozenSourceGeneratedDocumentsCompilationTracker(
49-
ICompilationTracker underlyingTracker,
49+
RegularCompilationTracker underlyingTracker,
5050
TextDocumentStates<SourceGeneratedDocumentState> replacementDocumentStates)
5151
{
5252
this.UnderlyingTracker = underlyingTracker;

src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,12 @@ public SolutionCompilationState WithFrozenSourceGeneratedDocuments(
13851385
existingTracker = CreateCompilationTracker(projectId, arg.SolutionState);
13861386
}
13871387

1388-
trackerMap[projectId] = new WithFrozenSourceGeneratedDocumentsCompilationTracker(existingTracker, new(documentStatesForProject));
1388+
// We should never be wrapping a WithFrozenSourceGeneratedDocumentsCompilationTracker with another
1389+
// WithFrozenSourceGeneratedDocumentsCompilationTracker. If we do, that's a straight bug that
1390+
// should fail immediately. So blind casting is here is appropriate.
1391+
var regularCompilationTracker = (RegularCompilationTracker)existingTracker;
1392+
trackerMap[projectId] = new WithFrozenSourceGeneratedDocumentsCompilationTracker(
1393+
regularCompilationTracker, new(documentStatesForProject));
13891394
}
13901395
},
13911396
(documentStatesByProjectId, this.SolutionState),

0 commit comments

Comments
 (0)