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

Merge release/dev16.11 to release/dev16.11-vs-deps #53678

Conversation

dotnet-bot
Copy link
Collaborator

This is an automatically generated pull request from release/dev16.11 into release/dev16.11-vs-deps.

Once all conflicts are resolved and all the tests pass, you are free to merge the pull request. 🐯

Troubleshooting conflicts

Identify authors of changes which introduced merge conflicts

Scroll to the bottom, then for each file containing conflicts copy its path into the following searches:

Usually the most recent change to a file between the two branches is considered to have introduced the conflicts, but sometimes it will be necessary to look for the conflicting lines and check the blame in each branch. Generally the author whose change introduced the conflicts should pull down this PR, fix the conflicts locally, then push up a commit resolving the conflicts.

Resolve merge conflicts using your local repo

Sometimes merge conflicts may be present on GitHub but merging locally will work without conflicts. This is due to differences between the merge algorithm used in local git versus the one used by GitHub.

git fetch --all
git checkout merges/release/dev16.11-to-release/dev16.11-vs-deps
git reset --hard upstream/release/dev16.11-vs-deps
git merge upstream/release/dev16.11
# Fix merge conflicts
git commit
git push upstream merges/release/dev16.11-to-release/dev16.11-vs-deps --force

jasonmalinowski and others added 5 commits May 20, 2021 17:25
I believe this fixes #52698,
although I don't have a dump for that issue so I'm having to deduce
what I think happened based on the stack alone. Unfortunately the stack
also has some frames inlined so there's a bit more guessing than usual:

The stack shows that we ended up in Comparer.Compare and it threw; the
only exception that it throws directly if the thing being compared
isn't IComparable. There aren't many uses of ImmutableSortedDictionary
in Roslyn, but the one specific one that makes sense to be under
GetDocumentState is the one we have inside our TextDocumentStates type.
And that one is one where we normally pass in a custom comparer to pass
in DocumentIds, so it seems logical that we somehow ended up with
a map that didn't have our comparer.

It turns out the Empty member we had didn't specify one, so if we
started with the Empty member and then added stuff from there, we'd end
up with such a map without a comparer. Why didn't we see this right
away? Because it turns out we only have a few uses of .Empty, most
of which are with source generated files. And even then we often are
creating the source generated collections with something else.
…-potentially-having-no-comparer

Always make sure we have the right comparer for DocumentIds
If we are processing edits through TryApplyChanges for closed files,
we'll make a series of changes in rapid succession: we'll have one
change that may open the file in an invisible editor, then we'll
edit the file, and then close again. The Solution object would then
be holding onto the old Compilation with several changes queued, which
would root the intermediate states that still pointed the editor
contents and their change lists which can be large. Once a Compilation
was requested for this new file, we'd process all the changes and
free the memory, but if the file is closed we might not get to that
right away.
…s-compilation-steps

Don't hold onto some SourceTexts if multiple changes happen
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Auto-approval

@Cosifne Cosifne merged commit a96c755 into release/dev16.11-vs-deps May 25, 2021
@dotnet-bot dotnet-bot deleted the merges/release/dev16.11-to-release/dev16.11-vs-deps branch May 25, 2021 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants