Skip to content

Merge release/dev17.3 to release/dev17.3-vs-deps#62836

Merged
dotnet-bot merged 2 commits intorelease/dev17.3-vs-depsfrom
merges/release/dev17.3-to-release/dev17.3-vs-deps
Jul 21, 2022
Merged

Merge release/dev17.3 to release/dev17.3-vs-deps#62836
dotnet-bot merged 2 commits intorelease/dev17.3-vs-depsfrom
merges/release/dev17.3-to-release/dev17.3-vs-deps

Conversation

@dotnet-bot
Copy link
Copy Markdown
Collaborator

This is an automatically generated pull request from release/dev17.3 into release/dev17.3-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 -t upstream/merges/release/dev17.3-to-release/dev17.3-vs-deps
git reset --hard upstream/release/dev17.3-vs-deps
git merge upstream/release/dev17.3
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.3-to-release/dev17.3-vs-deps --force

GetNext/PreviousDirective work by walking the list of trivia and
when they see the SyntaxTrivia that represents 'this', they set a flag
and then continue to traverse and return the next directive found.
There was a bug though in handling of duplicate trivia: if somebody
were to create a node that has the same trivia twice, that may share
the underlying green node. The boolean flag of "return next directive"
was set if the green node matched, but no checking was done of the span
or index to verify it was the correct instance of the green node. This
meant that somebody calling GetNextDirective on the second directive
would get the second directive back again, since internally the loop
would see the first directive, go "oh, that's me!" and return the
second one.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1568850,
or at least the fact it causes crashes. An IDE bug is causing us to
accidentally introduce duplicate trivia, but in the process it's causing
compiler functions that depend on GetNext/PreviousDirective to end up
in a stack overflow, because they assume progress will be made by these
functions.
…directive

Fix GetNext/PreviousDirective's handling of duplicate trivia
Copy link
Copy Markdown

@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

@dotnet-bot dotnet-bot merged commit 7928094 into release/dev17.3-vs-deps Jul 21, 2022
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