-
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
Merge release/dev16.11-vs-deps to main-vs-deps #53690
Merged
Cosifne
merged 9 commits into
main-vs-deps
from
merges/release/dev16.11-vs-deps-to-main-vs-deps
May 26, 2021
Merged
Merge release/dev16.11-vs-deps to main-vs-deps #53690
Cosifne
merged 9 commits into
main-vs-deps
from
merges/release/dev16.11-vs-deps-to-main-vs-deps
May 26, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
…ase/dev16.11-vs-deps Merge release/dev16.11 to release/dev16.11-vs-deps
Keep OptProf input indefinitely
…ase/dev16.11-vs-deps Merge release/dev16.11 to release/dev16.11-vs-deps
ghost
approved these changes
May 26, 2021
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.
Auto-approval
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an automatically generated pull request from release/dev16.11-vs-deps into main-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-vs-deps-to-main-vs-deps git reset --hard upstream/main-vs-deps git merge upstream/release/dev16.11-vs-deps # Fix merge conflicts git commit git push upstream merges/release/dev16.11-vs-deps-to-main-vs-deps --force