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 master to features/readonly-members #33554

Merged

Conversation

dotnet-bot
Copy link
Collaborator

This is an automatically generated pull request from master into features/readonly-members.

git fetch --all
git checkout merges/master-to-features/readonly-members
git reset --hard upstream/features/readonly-members
git merge upstream/master
# Fix merge conflicts
git commit
git push upstream merges/master-to-features/readonly-members --force

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

jasonmalinowski and others added 30 commits February 15, 2019 09:42
WpfSharedTestData had two static members: Instance and
TestSerializationGateName. TestSerializationGateName is the name of a
system-wide Semaphore that was used to execute WpfFacts one at time.
The intent is this was a GUID so it wouldn't actually be shared.
Unfortunately, the Instance member is initialized first; and the
non-static Semaphore field is initialized with the still uninitialized
TestSerializationGateName. This means our Semaphore would always be
named with a GUID of all-zeros, causing us to share the semaphore
between all running xUnit processes. This was terribly bad for
two reasons:

1. It kills test performance. We run tests in parallel in separate
   processes to ensure isolation, but this sharing of the semaphore
   meant that all of those processes are only running one test at a
   time, defeating all running of tests in parallel.
2. If one test process crashes, the Semaphore is never freed, meaning
   all your other test processes will deadlock and never complete.

It's unclear why this code is using a Semaphore, but since we have
no need to share the Semaphore between processes, we can use a
SemaphoreSlim. This also has the added benefit of properly supporting
a WaitAsync that isn't implemented by launching off a Thread just to
wait for the system semaphore.
It was marked as [Serializable] but the type never would have been
because it holds onto non-Serializable types. We also were never using
the serialization abilities: it seems in the end we always just used
WpfTestSharedData.Instance regardless.
These not being under the lock would mean parallel calls to
OnDocumentOpened/Closed might race against each other. We don't think
this is a practical problem as current callers are already taking their
own locks or are affinitized to the UI thread, but it would be good to
fix nonetheless.
The determinism job has started to intermittently timeout over the last
few days. The job typically runs in ~50 minutes which is well below the
90 minute limit. On failed runs though there are no obvious outliers
that are causing the timeouts. The builds and restores are happening at
the time intervals we would expect.

This change adds more time diagontics to the run. It's unlikely that any
of these sections are responsible for the 40 minute gap we're seeing in
the bad runs but at this point need to rule out everything.
InvalidCastException on extract method in expression bodied constructor.
MemberDeclarationSyntaxExtensions.GetExpressionBody() about constructor
expression body methods: this is being used from
CSharpMethodExtractor.CSharpCodeGenerator.CreateStatementsOrInitializerToInsertAtCallSiteAsync():139,
which caused the code to not be aware that the constructor is an
expression method body, leading to a different code path, and eventually
an invalid cast.
The name for the named pipe used between MSBuild and VBCSCompiler is
generated from a combination of values including the current user name,
specifically `%USERNAME%`. It is possible for this value to have spaces
in it and hence the argument must be quoted when passing it to the
command line of VBCSCompiler instances.

Regression initially introduced: #32257
Ensure pipename argument quoted
Increase diagnostics in determinism job
These assemblies target netstandard1.3, not 2.0.
* Document ref enumerator disposal compat break
* Add a ref struct disposal test:
- Check that we don't call Dispose on a ref struct enumerator in language versions lower than 8.0
- Add an execution test to check end to end
Do not offer to convert object initializers to a compound assignment.
Previously opened additional documents weren't counted as open in
Workspace.IsDocumentOpen, but after
#33165 we can now properly do this
check.
* Read IBC and VS bootstrapper info from PublishData.json

* Fix IBC directory path
…re-sharing

Don't accidentally share a named semaphore between test processes
The bootstrap builds of the compiler today are using the default trace
listener which presents a dialog. That means when a `Debug.Assert` call
fires we end up hanging the build in Azure.

The intent was always for the bootstrap builds to use the
`ExitingTraceListener`. This way they exit with a crash and call stack
that allows the compiler team to diagnose the failure.

The behavior of `Debug.Assert` showing a dialog is the most likely
explanation for our current random hangs in the determinism leg. That is
the only place we still use a `DEBUG + BOOTSTRAP` build. The symptoms
line up. If that's the case this will start showing us the stack trace
of the assert.
…tract-method-on-expression-bodied-ctors

Fix issue #33242: ExtractMethodCodeRefactoringProvider throws invalid cast when used within the body of a constructor expression-member body
Avoid trying to write log files longer than max path
* pool incrementalHash so that we don't create one unnecessarily

* renamed to s_incrementalHashPool
sharwell and others added 15 commits February 20, 2019 09:49
…ialization-lock

Move open/closed document checks under the _serializationLock
Bootstrap builds should use ExitingTraceListener
Include the hidden NUL in max path length calculation
Do not skip editorconfig integration tests
Include RunTests.exe and xunit.console.x86.exe in .NET event collection
* Remove vbc2.exe since it's no longer used
* Add xunit.console.exe (64-bit runner)
* Document nullable disable for generated code
Adjust process logging for applicability to current builds
Disable broken checksum validation
* when PreferProvisionalTab option is added, work is done only in OpenDocument, but not in NavigateTo making the option useless in some cases since NavigateTo makes focus to move to provisional tab right after OpenDocument call which make sure provisional tab to not activated.

fix is following editor team's recommendation from https://devdiv.visualstudio.com/DevDiv/_workitems/edit/402396

* address feedback to wrap whole code under scope
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

@ghost ghost merged commit a330cdc into features/readonly-members Feb 21, 2019
@ghost ghost deleted the merges/master-to-features/readonly-members branch February 21, 2019 13:30
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.