-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add mitigation in 17.7 for cases where local and remote host disagree on source generated files. #69965
Conversation
b198cc1
to
4c56cbe
Compare
…ument or not Docs REorder mistype
4c56cbe
to
f6d6c20
Compare
f6d6c20
to
0271d21
Compare
0271d21
to
f110af5
Compare
@@ -137,6 +137,9 @@ public void AugmentPeekSession(IPeekSession session, IList<IPeekableItem> peekab | |||
workspace, document.Id, item.SourceSpan.Start, cancellationToken).ConfigureAwait(false)) | |||
{ | |||
var text = await document.GetTextAsync(project.Solution, cancellationToken).ConfigureAwait(false); | |||
if (text is null) | |||
continue; |
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.
❓ Can we put this in CanNavigateToPositionAsync
instead?
bool throwForMissingSourceGenerated = true, | ||
CancellationToken cancellationToken = default) |
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.
💡 Overloads are preferred in order to make cancellationToken
required on all paths
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.
will do.
Closing out. Did not get QB approval. |
We're seeing a lot of crashes in the wild where the local VS workspace and the Remote OOP workspace disagree on what trees are present within each other (for example, in #69234).
When looking at these crashes, we commonly see stuff like:
indicating that this is an issue primarily with SG docs. Our theory (which we are still collecting data/dumps on) is that there is either a bug in our workspace in terms of how we generate SG docs, or there is a buggy SG out there which doesn't operate deterministically. In either event, the two hosts could then see a different set of documents, which would then cause these crashes.
To address this, we've made a larger/riskier change in main here #69917 to make it so that the local VS workspace always defers to the remote workspace for SG contents. This should ensure that there is no way for these systems to be out of sync.
However, we do not want to port a large/risky change like that back to 17.7. So, instead we're considering mitigating the issue in 17.7 such that the features that are currently affected make themselves resilient to this scenario. This is not something we want to be in 17.8, so if this is accepted, we will undo this change there and only take the full fix.
When this flows into main, we will want to keep the first commit, which corresponds to #69952.
We will not want to keep the second commit.