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 'dotnet/master' into DefaultInterfaceImplementation #34513

Merged
Changes from 1 commit
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
09e5720
Remove unused Code Cleanup options
sharwell Jan 4, 2019
3a0a673
Implement code cleanup in project and solution
sharwell Jan 4, 2019
83910ee
Share code for fixing solution/project/document
sharwell Jan 10, 2019
48d2c3d
Document nested progress trackers
sharwell Jan 10, 2019
e0c5037
Avoid applying changes to generated code
sharwell Jan 11, 2019
1ec3ef0
Merge remote-tracking branch 'dotnet/master-vs-deps' into cleanup-sol…
sharwell Feb 1, 2019
e177d8a
Fix regression in Cleanup Document performed in the editor
sharwell Feb 1, 2019
a8e39ed
Try to clean up the project in the active IntelliSense context
sharwell Feb 1, 2019
e145617
Update AnalyzerRunner launch settings
JoeRobich Mar 12, 2019
d6f7504
Show document progress when cleaning up a solution
sharwell Feb 14, 2019
0944aac
Merge remote-tracking branch 'dotnet/master' into cleanup-solution
sharwell Mar 15, 2019
2a3893e
Completion gets in the way attempting to line up arguments
ivanbasov Mar 19, 2019
3f9dfe0
Filter out additive classifications in EditorClassifier
JoeRobich Mar 20, 2019
d3ff068
Use Assumes.Present instead of Debug.Assert
sharwell Jul 15, 2018
015a73c
Merge remote-tracking branch 'dotnet/master' into cleanup-solution
sharwell Mar 21, 2019
748a019
Remove the ProgressTracker wrapper in FixSolutionAsync
sharwell Mar 21, 2019
1e4c336
Extract helper method CanCleanupProject
sharwell Mar 21, 2019
2945d19
Implement Find Symbol References API for VsDebugPresentationPackage
sharwell Mar 8, 2019
8d518d6
Generalize VsDebugPresentationPackage to Debugger
sharwell Mar 12, 2019
b925912
Updates from code review
sharwell Mar 13, 2019
706f228
Include ExternalAccess.Debugger in VS.ExternalAPIs.Roslyn.Package
sharwell Mar 21, 2019
5cd926a
Refactoring of AbstractRecommendationService. Required for ThenInclude
ivanbasov Mar 22, 2019
d51a49a
formatting
ivanbasov Mar 22, 2019
1503e5c
Expedite delayed operations when tests are waiting
sharwell Mar 10, 2019
a61bf02
Make sure squiggle tests wait for ErrorSquiggles
sharwell Mar 11, 2019
9c8c51a
Simplify signature of CreateWaitTask
sharwell Mar 11, 2019
fd1a0be
Rewrite INotifyBlockedOnCompletion as IExpeditableDelaySource
sharwell Mar 22, 2019
f9f17ce
Improved clarity for IExpeditableDelaySource implementation
sharwell Mar 22, 2019
bbe47d1
Simplify the use of IExpeditableDelaySource by returning Task<bool>
sharwell Mar 22, 2019
c4df892
Move checks into try/catch block
ryzngard Mar 22, 2019
ec6cb33
Partially implement `ApplyChangesKind.ChangeDocumentInfo` in the VS w…
dpoeschl Feb 27, 2019
57895b2
In Rename File To Match Type, perform a document rename instead of re…
dpoeschl Feb 27, 2019
fbb795a
Remove RenameDocumentOperation
dpoeschl Feb 28, 2019
9a969a1
Comments, and throw on unexpected DocumentInfo changes
dpoeschl Feb 28, 2019
80cd4fc
Use unique name when renaming the file
dpoeschl Mar 1, 2019
9fd399c
Update comment
dpoeschl Mar 1, 2019
2a3e44b
Fail on unexpected kinds of DocumentInfo changes
dpoeschl Mar 1, 2019
e5cc5c5
Update unit test expectations
dpoeschl Mar 1, 2019
812332c
Initial Rename File To Match Type Name integration tests
dpoeschl Mar 6, 2019
dcf478c
Don't crash if the file being renamed is in a shared project
dpoeschl Mar 6, 2019
5d62dd5
Improve exception messages
dpoeschl Mar 13, 2019
4abfc1c
Use correct StringComparer
dpoeschl Mar 14, 2019
73ff847
Make (DTE)Project.FindItemByPath recursive
dpoeschl Mar 14, 2019
31f5009
FindItemByPath when searching for a document in a DTE Project
dpoeschl Mar 14, 2019
b4af242
Properly consume ITestOutputHelper
dpoeschl Mar 14, 2019
f223b92
Add integration test for matching file name in subfolders
dpoeschl Mar 14, 2019
f783e8b
Address Feedback
dpoeschl Mar 19, 2019
8034cd7
Address Feedback
dpoeschl Mar 19, 2019
9d7067e
Rename for clarity
dpoeschl Mar 19, 2019
8ba94fa
Add undo capability
dpoeschl Mar 20, 2019
31e77cc
Apply text changes before document info changes
dpoeschl Mar 20, 2019
0090f5a
Remove unused usings
dpoeschl Mar 21, 2019
630b5c5
Use resource for string
dpoeschl Mar 21, 2019
6b25900
Loc files
dpoeschl Mar 21, 2019
4a1cb06
Fix integration test
dpoeschl Mar 22, 2019
72427c3
Remove stale comment
dpoeschl Mar 22, 2019
1628d21
Better comment
dpoeschl Mar 22, 2019
b152c1a
Debug.Assert on Shared Project file name changes
dpoeschl Mar 22, 2019
7232fd5
Do not return null task In RemoveHostClientExtensions
ryzngard Mar 22, 2019
7bf8d65
Updated wait operations to fix unreliable .editorconfig integration t…
sharwell Mar 22, 2019
0e0a222
Append xml doc comment for ILocalSymbol.IsFunctionValue
GeorgeAlexandria Mar 22, 2019
55d3021
Fix GetOpenDocumentInCurrentContextWithChanges with linked files
jasonmalinowski Mar 22, 2019
41fb51d
Interactive projects refactoring (#29069)
tmat Mar 23, 2019
ced90cb
Merge pull request #34361 from sharwell/fix-editorconfig-tests
sharwell Mar 23, 2019
e0a8124
Revert "Interactive projects refactoring (#29069)"
sharwell Mar 23, 2019
f55c605
Merge pull request #34382 from dotnet/revert-29069-InteractiveRefacto…
sharwell Mar 23, 2019
435128f
Merge pull request #34374 from dotnet/merges/dev16.0-to-master
Mar 23, 2019
3227008
Merge pull request #34007 from sharwell/reduced-test-wait
sharwell Mar 23, 2019
7e6f93e
Merge pull request #33948 from sharwell/debugger-far
sharwell Mar 24, 2019
5a62920
Disable rename tracking when replacing with discard
sharwell Mar 24, 2019
d688e95
Merge pull request #28556 from sharwell/assumes-present
sharwell Mar 25, 2019
7ab3b77
Interactive Window refactoring (#34390)
tmat Mar 25, 2019
c0a7325
Noticed and fixed typo in docs/contributing/Building, Debugging, and …
Mar 25, 2019
23aa56b
Merge pull request #34391 from sharwell/rename-to-discard
sharwell Mar 25, 2019
80ddfec
Merge pull request #34401 from KGRWhite/typoFix
jmarolf Mar 25, 2019
d5d6a96
Verify some nullable bugs (#34372)
jcouv Mar 25, 2019
492ac08
Merge pull request #34364 from GeorgeAlexandria/patch-1
jaredpar Mar 25, 2019
47c5d44
Merge pull request #34355 from jasonmalinowski/update-all-linked-file…
jasonmalinowski Mar 25, 2019
a13ad57
Merge pull request #33733 from dpoeschl/RenameDocumentImprovements
dpoeschl Mar 25, 2019
96e297a
Merge pull request #34346 from ivanbasov/AbstractRecommendationService
ivanbasov Mar 25, 2019
68b00d5
Update Linux LLDB/SOS instructions (#34340)
chsienki Mar 25, 2019
01b0ca2
Update infrastructure for 16.1 preview1
JoeRobich Mar 25, 2019
ac08b67
Merge pull request #34315 from JoeRobich/filter-additive-classifications
JoeRobich Mar 25, 2019
75532a3
Merge pull request #34042 from JoeRobich/fix-analyzer-runner
JoeRobich Mar 25, 2019
8a1a8d0
Merge pull request #32175 from sharwell/cleanup-solution
sharwell Mar 25, 2019
525883f
Move EnC debug information reading to Features. (#34322)
tmat Mar 25, 2019
3617933
Don't complete statement when in multi-line verbatim string that is p…
chborl Mar 26, 2019
a515307
Offer add parameter to constructor refactoring for all applicable con…
chborl Mar 26, 2019
c18c90c
made light bulb to check workspace status service (#34238)
heejaechang Mar 26, 2019
b28ec8a
Merge pull request #34416 from JoeRobich/snap-16.1-preview1
JoeRobich Mar 26, 2019
7aac2e3
Track nullability across reference and nullable conversions of tuple …
cston Mar 26, 2019
8e19785
Update src/Workspaces/Core/Portable/Remote/RemoteHostClientExtensions.cs
sharwell Mar 26, 2019
17eb073
Merge pull request #34358 from ryzngard/issue/longpath_try_catch
ryzngard Mar 26, 2019
7f809ef
Track nullability in script code (#33096)
filipw Mar 26, 2019
84cf3ef
Track l-value types in conditional operator (#34323)
jcouv Mar 26, 2019
6ac872c
Run CI on dev16.1-preview1 branches
JoeRobich Mar 26, 2019
4856587
Merge pull request #34359 from dotnet/ryzngard-patch-1
ryzngard Mar 26, 2019
d957adb
Merge pull request #34479 from JoeRobich/run-ci-dev16.1-preview1
JoeRobich Mar 26, 2019
2fbe5ad
Remove IFromIndexOperation completely (#34306)
agocke Mar 26, 2019
90895f9
Completion gets in the way attempting to line up arguments
ivanbasov Mar 26, 2019
be90cab
Update the dev16.1-preview1 vsbranch
JoeRobich Mar 27, 2019
fe1368e
Merge pull request #34488 from dotnet/merges/dev16.1-preview1-to-master
Mar 27, 2019
b980a38
first work to remove IEditorClassificationService (#31734)
heejaechang Mar 27, 2019
bb7de15
Merge remote-tracking branch 'dotnet/master' into DefaultInterfaceImp…
AlekseyTs Mar 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improved clarity for IExpeditableDelaySource implementation
  • Loading branch information
sharwell committed Mar 22, 2019
commit f9f17ce6daad7072a6eb4adde999ee45cf4a5e6b
3 changes: 3 additions & 0 deletions src/Features/Core/Portable/SolutionCrawler/IdleProcessor.cs
Original file line number Diff line number Diff line change
@@ -75,6 +75,9 @@ protected async Task WaitForIdleAsync(IExpeditableDelaySource expeditableDelaySo
{
// The delay terminated early to accommodate a blocking operation. Make sure to delay long
// enough that low priority (on idle) operations get a chance to be triggered.
//
// 📝 At the time this was discovered, it was not clear exactly why the delay was needed in order
// to avoid live-lock scenarios.
await Task.Delay(TimeSpan.FromMilliseconds(10)).ConfigureAwait(false);
return;
}
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ internal sealed partial class AsynchronousOperationListener : IAsynchronousOpera

private readonly string _featureName;
private readonly HashSet<TaskCompletionSource<bool>> _pendingTasks = new HashSet<TaskCompletionSource<bool>>();
private CancellationTokenSource _blockedOnCompletionTokenSource;
private CancellationTokenSource _expeditedDelayCancellationTokenSource;

private List<DiagnosticAsyncToken> _diagnosticTokenList = new List<DiagnosticAsyncToken>();
private int _counter;
@@ -31,20 +31,20 @@ public AsynchronousOperationListener() :
public AsynchronousOperationListener(string featureName, bool enableDiagnosticTokens)
{
_featureName = featureName;
_blockedOnCompletionTokenSource = new CancellationTokenSource();
_expeditedDelayCancellationTokenSource = new CancellationTokenSource();
TrackActiveTokens = Debugger.IsAttached || enableDiagnosticTokens;
}

public async Task Delay(TimeSpan delay, CancellationToken cancellationToken)
{
var blockedOnCompletionToken = _blockedOnCompletionTokenSource.Token;
using (var cancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, blockedOnCompletionToken))
var expeditedDelayCancellationToken = _expeditedDelayCancellationTokenSource.Token;
using (var cancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, expeditedDelayCancellationToken))
{
try
{
await Task.Delay(delay, cancellationTokenSource.Token).ConfigureAwait(false);
}
catch (OperationCanceledException) when (blockedOnCompletionToken.IsCancellationRequested && !cancellationToken.IsCancellationRequested)
catch (OperationCanceledException) when (expeditedDelayCancellationToken.IsCancellationRequested && !cancellationToken.IsCancellationRequested)
{
// The cancellation only occurred due to a request to expedite the operation
}
@@ -90,7 +90,10 @@ private void Decrement_NoLock(AsyncToken token)
}

_pendingTasks.Clear();
_blockedOnCompletionTokenSource = new CancellationTokenSource();

// Replace the cancellation source used for expediting waits.
var oldSource = Interlocked.Exchange(ref _expeditedDelayCancellationTokenSource, new CancellationTokenSource());
oldSource.Dispose();
}

if (_trackActiveTokens)
@@ -115,25 +118,18 @@ private void Decrement_NoLock(AsyncToken token)

public Task CreateExpeditedWaitTask()
{
if (_counter > 0)
{
_blockedOnCompletionTokenSource.Cancel();
}

using (_gate.DisposableWait(CancellationToken.None))
{
if (_counter == 0)
{
// There is nothing to wait for, so we are immediately done
if (_blockedOnCompletionTokenSource.IsCancellationRequested)
{
_blockedOnCompletionTokenSource = new CancellationTokenSource();
}

return Task.CompletedTask;
}
else
{
// Use CancelAfter to ensure cancellation callbacks are not synchronously invoked under the _gate.
_expeditedDelayCancellationTokenSource.CancelAfter(TimeSpan.Zero);

// Calling SetResult on a normal TaskCompletionSource can cause continuations to run synchronously
// at that point. That's a problem as that may cause additional code to run while we're holding a lock.
// In order to prevent that, we pass along RunContinuationsAsynchronously in order to ensure that