Skip to content

Commit 2aacfb2

Browse files
committed
Add notes learned from debugging
1 parent 3ca2ae6 commit 2aacfb2

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

PowerShellEditorServices.build.ps1

+4
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ task TestServer TestServerWinPS,TestServerPS7,TestServerPS72
238238

239239
task TestServerWinPS -If (-not $script:IsNix) {
240240
Set-Location .\test\PowerShellEditorServices.Test\
241+
# TODO: See https://github.com/dotnet/sdk/issues/18353 for x64 test host
242+
# that is debuggable! If architecture is added, the assembly path gets an
243+
# additional folder, necesstiating fixes to find the commands definition
244+
# file and test files.
241245
exec { & $script:dotnetExe $script:dotnetTestArgs $script:NetRuntime.Desktop }
242246
}
243247

src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation.
1+
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

44
using System;
@@ -245,6 +245,11 @@ public void TriggerShutdown()
245245
if (Interlocked.Exchange(ref _shuttingDown, 1) == 0)
246246
{
247247
_cancellationContext.CancelCurrentTaskStack();
248+
// NOTE: This is mostly for sanity's sake, as during debugging of tests I became
249+
// concerned that the repeated creation and disposal of the host was not also
250+
// joining and disposing this thread, leaving the tests in a weird state. Because
251+
// the tasks have been canceled, we should be able to join this thread.
252+
_pipelineThread.Join();
248253
}
249254
}
250255

@@ -550,6 +555,8 @@ private void RunTopLevelExecutionLoop()
550555
}
551556
else
552557
{
558+
// TODO: Is this really necessary? The other 'RunExecutionLoop' already handles
559+
// the case where the console REPL isn't enabled.
553560
RunNoPromptExecutionLoop();
554561
}
555562
}

src/PowerShellEditorServices/Services/TextDocument/ScriptFile.cs

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ internal sealed class ScriptFile
3939
/// </summary>
4040
public string Id
4141
{
42+
// TODO: Is this why the drive letter changes?
4243
get { return this.FilePath.ToLower(); }
4344
}
4445

0 commit comments

Comments
 (0)