Closed lyjdwh closed 4 years ago
Can you provide file to reproduce the issue with?
Can you provide file to reproduce the issue with?
Any python file that has function/variable/class references in my case!
When I set lsp-log-io
to t
and run the command lsp-find-references
,then I get this! It seems the argument that lsp sends to Microsoft LanguageServer is not right!
[Trace - 07:50:17 下午] Sending request 'textDocument/references - (215)'.
Params: {
"textDocument": {
"uri": "file:///home/liuyan/test/test.py"
},
"position": {
"line": 9,
"character": 3
},
"context": {
"includeDeclaration": false
}
}
[Trace - 07:50:17 下午] Received notification 'telemetry/event'.
Params: {
"Measurements": {
"elapsedMs": 1.3763
},
"Properties": {
"plsVersion": "0.5.45.0",
"method": "textDocument/references"
},
"EventName": "python_language_server/rpc.request"
}
[Trace - 07:50:17 下午] Received notification 'telemetry/event'.
Params: {
"Measurements": {
},
"Properties": {
"plsVersion": "0.5.45.0",
"method": "textDocument/references",
"stackTrace": " at System.IO.Path.GetFullPath(String path)\n at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)\n at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)\n at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)\n at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)\n at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)\n at Microsoft.Python.Core.IO.FileSystem.GetFiles(String path, String pattern, SearchOption option) in E:\\A\\_work\\1\\s\\src\\Core\\Impl\\IO\\FileSystem.cs:line 58\n at Microsoft.Python.LanguageServer.Sources.ReferenceSource.ScanClosedFiles(String name, CancellationToken cancellationToken) in E:\\A\\_work\\1\\s\\src\\LanguageServer\\Impl\\Sources\\ReferenceSource.cs:line 117\n at Microsoft.Python.LanguageServer.Sources.ReferenceSource.FindAllReferencesAsync(String name, IPythonModule declaringModule, ILocatedMember rootDefinition, SourceLocation location, DefinitionSource definitionSource, CancellationToken cancellationToken) in E:\\A\\_work\\1\\s\\src\\LanguageServer\\Impl\\Sources\\ReferenceSource.cs:line 82\n at Microsoft.Python.LanguageServer.Sources.ReferenceSource.FindAllReferencesAsync(Uri uri, SourceLocation location, ReferenceSearchOptions options, CancellationToken cancellationToken) in E:\\A\\_work\\1\\s\\src\\LanguageServer\\Impl\\Sources\\ReferenceSource.cs:line 75\n at Microsoft.Python.LanguageServer.Implementation.LanguageServer.FindReferences(JToken token, CancellationToken cancellationToken) in E:\\A\\_work\\1\\s\\src\\LanguageServer\\Impl\\LanguageServer.cs:line 210",
"name": "ArgumentException"
},
"EventName": "python_language_server/rpc.exception"
}
[Trace - 07:50:17 下午] Received response 'textDocument/references - (215)' in 9ms.
Result: null
[Trace - 07:50:17 下午] Sending notification '$/cancelRequest'.
Params: {
"id": 215
}
After I reinstall my spacemacs, the problem disappears!
Describe the bug When using
lsp-python-ms,
I run the commandxref-find-references
emacs shows:eror The path is empty. (Parameter ’path’)
When usingpyls,
it 's all ok.To Reproduce In a python file, use
lsp-python-ms
and run the commandxref-find-references
orlsp-ui-peek-find-references
Expected behavior list all the references
Which Language Server did you use lsp-python-ms-20200223.2136 languageServer.0.5.45
OS manjaro kde spacemacs
Error callstack