Skip to content

Merge main to main-vs-deps#52533

Merged
29 commits merged intomain-vs-depsfrom
merges/main-to-main-vs-deps
Apr 9, 2021
Merged

Merge main to main-vs-deps#52533
29 commits merged intomain-vs-depsfrom
merges/main-to-main-vs-deps

Conversation

@dotnet-bot
Copy link
Copy Markdown
Collaborator

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

MaStr11 and others added 29 commits April 7, 2021 11:13
Co-authored-by: Jason Malinowski <jason.malinowski@microsoft.com>
…CheckTests.cs

Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
* Fix race conditions in attribute asserts

There are asserts in our `CustomAttributeBag` to verify we maintain the
invariant that early decoding occurs before the full decoding. The
asserts though done in the getters and take the following form:

```cs
bool earlyComplete = IsPartComplete(CustomAttributeBagCompletionPart.EarlyDecodedWellKnownAttributeData);
// If late attributes are complete, early attributes must also be complete
Debug.Assert(!IsPartComplete(CustomAttributeBagCompletionPart.DecodedWellKnownAttributeData) || earlyComplete);
return earlyComplete;
```

This pattern is subject to race conditions. Consider the case where the
`bool earlyComplete` statement runs to completion and returns `false`. Then
another thread swaps in and completes both early and full decoding. At
that point the original thread resumes and the `Debug.Assert` will fail
yet no invariant has been violated.

Moved the `Debug.Assert` into the setters where we can reliably test the
state invariants.

closes #52372
related to #52368

* Fix

* Add back an assert
"Add null check" inserts single line statements if preferred
Add publish data for d17p1 branch
Use CancellationSeries in ExternalErrorDiagnosticUpdateSource
@dotnet-bot dotnet-bot requested a review from a team as a code owner April 9, 2021 22:18
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

@ghost ghost merged commit b70ecbb into main-vs-deps Apr 9, 2021
@ghost ghost deleted the merges/main-to-main-vs-deps branch April 9, 2021 23:16
@ghost ghost added this to the Next milestone Apr 9, 2021
@dibarbet dibarbet modified the milestones: Next, 16.10.P3 Apr 26, 2021
This pull request was closed.
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.

7 participants