Skip to content

Commit 483a3fd

Browse files
committed
Set EnableProfileLoading default to true
So it can be turned off if needed, but otherwise has a sane default. We need to turn it off during E2E testing for CI.
1 parent d198694 commit 483a3fd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/PowerShellEditorServices/Server/PsesLanguageServer.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ public async Task StartAsync()
141141
JObject initializationOptions = initializeParams.InitializationOptions as JObject;
142142
HostStartOptions hostStartOptions = new()
143143
{
144-
LoadProfiles = initializationOptions?.GetValue("EnableProfileLoading")?.Value<bool>() ?? false,
144+
// TODO: We need to synchronize our "default" settings as specified
145+
// in the VS Code extension's package.json with the actual default
146+
// values in this project. For now, this is going to be the most
147+
// annoying setting, so we're defaulting this to true.
148+
LoadProfiles = initializationOptions?.GetValue("EnableProfileLoading")?.Value<bool>() ?? true,
145149
// TODO: Consider deprecating the setting which sets this and
146150
// instead use WorkspacePath exclusively.
147151
InitialWorkingDirectory = initializationOptions?.GetValue("InitialWorkingDirectory")?.Value<string>() ?? workspaceService.WorkspacePath

test/PowerShellEditorServices.Test.E2E/LSPTestsFixures.cs

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public async Task InitializeAsync()
5757
.WithInput(_psesProcess.OutputStream)
5858
.WithOutput(_psesProcess.InputStream)
5959
.WithRootUri(DocumentUri.FromFileSystemPath(testdir.FullName))
60+
.WithInitializationOptions(new { EnableProfileLoading = false })
6061
.OnPublishDiagnostics(diagnosticParams => Diagnostics.AddRange(diagnosticParams.Diagnostics.Where(d => d != null)))
6162
.OnLogMessage(logMessageParams => Output?.WriteLine($"{logMessageParams.Type}: {logMessageParams.Message}"))
6263
.OnTelemetryEvent(telemetryEventParams => TelemetryEvents.Add(

0 commit comments

Comments
 (0)