File tree Expand file tree Collapse file tree 5 files changed +16
-7
lines changed
src/PowerShellEditorServices Expand file tree Collapse file tree 5 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 2828 <PackageReference Include =" Microsoft.CSharp" Version =" 4.7.0" />
2929 <PackageReference Include =" Microsoft.Extensions.FileSystemGlobbing" Version =" 6.0.0" />
3030 <PackageReference Include =" Microsoft.Extensions.Logging" Version =" 6.0.0" />
31- <!-- Manually pull in the updated version of Newtonsoft.Json. -->
32- <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.1" / >
31+ <!-- TODO: Manually pull in the updated version of Newtonsoft.Json after OmniSharp updates . -->
32+ <!-- PackageReference Include="Newtonsoft.Json" Version="13.0.1" -- >
3333 <PackageReference Include =" OmniSharp.Extensions.LanguageServer" Version =" 0.19.6" />
3434 <PackageReference Include =" OmniSharp.Extensions.DebugAdapter.Server" Version =" 0.19.6" />
3535 <PackageReference Include =" PowerShellStandard.Library" Version =" 5.1.1" />
Original file line number Diff line number Diff line change 1- // Copyright (c) Microsoft Corporation.
1+ // Copyright (c) Microsoft Corporation.
22// Licensed under the MIT License.
33
44using System ;
@@ -89,6 +89,8 @@ public async Task StartAsync()
8989 {
9090 // Start the host if not already started, and enable debug mode (required
9191 // for remote debugging).
92+ //
93+ // TODO: We might need to fill in HostStartOptions here.
9294 _startedPses = ! await _psesHost . TryStartAsync ( new HostStartOptions ( ) , cancellationToken ) . ConfigureAwait ( false ) ;
9395 _psesHost . DebugContext . EnableDebugMode ( ) ;
9496
Original file line number Diff line number Diff line change @@ -154,9 +154,9 @@ public async Task<CodeLens> ResolveCodeLens(
154154 Title = GetReferenceCountHeader ( referenceLocations . Length ) ,
155155 Arguments = JArray . FromObject ( new object [ ]
156156 {
157- scriptFile . DocumentUri ,
158- codeLens . Range . Start ,
159- referenceLocations
157+ scriptFile . DocumentUri ,
158+ codeLens . Range . Start ,
159+ referenceLocations
160160 } ,
161161 LspSerializer . Instance . JsonSerializer )
162162 }
Original file line number Diff line number Diff line change 55using System . Collections . Generic ;
66using System . Threading ;
77using System . Threading . Tasks ;
8+ using Newtonsoft . Json . Linq ;
89using Microsoft . Extensions . Logging ;
910using Microsoft . PowerShell . EditorServices . Services ;
1011using Microsoft . PowerShell . EditorServices . Services . TextDocument ;
1112using Microsoft . PowerShell . EditorServices . Utility ;
1213using OmniSharp . Extensions . LanguageServer . Protocol . Client . Capabilities ;
1314using OmniSharp . Extensions . LanguageServer . Protocol . Document ;
1415using OmniSharp . Extensions . LanguageServer . Protocol . Models ;
16+ using OmniSharp . Extensions . LanguageServer . Protocol . Serialization ;
1517
1618namespace Microsoft . PowerShell . EditorServices . Handlers
1719{
@@ -131,7 +133,11 @@ public override async Task<CommandOrCodeActionContainer> Handle(CodeActionParams
131133 {
132134 Title = title ,
133135 Name = "PowerShell.ShowCodeActionDocumentation" ,
134- Arguments = Newtonsoft . Json . Linq . JArray . FromObject ( new [ ] { diagnostic . Code ? . String } )
136+ Arguments = JArray . FromObject ( new object [ ]
137+ {
138+ diagnostic . Code ? . String
139+ } ,
140+ LspSerializer . Instance . JsonSerializer )
135141 }
136142 } ) ;
137143 }
Original file line number Diff line number Diff line change @@ -506,6 +506,7 @@ internal static bool IsPathInMemory(string filePath)
506506
507507 internal string ResolveRelativeScriptPath ( string baseFilePath , string relativePath )
508508 {
509+ // TODO: Sometimes the `baseFilePath` (even when its `WorkspacePath`) is null.
509510 string combinedPath = null ;
510511 Exception resolveException = null ;
511512
You can’t perform that action at this time.
0 commit comments