Open grahamj42 opened 2 years ago
This is one of the problems referred to in #1185
Log message:
[Error - 20:51:27] [2022-03-04T20:51:27.904000+01:00] [error] Error indexing file [filename=c:/Program%20Files/erl-24.1/lib/erts-12.1/src/erlang.erl, uri=file:///c:/Program%20Files/erl-24.1/lib/erts-12.1/src/erlang.erl] error:{badmatch,{error,enoent}}:[{els_indexing,try_index_file,2,[{file,"/Users/robert.aloi/git/github/erlang-ls/vscode/erlang_ls/apps/els_lsp/src/els_indexing.erl"},{line,153}]},{els_indexing,index_file,1,[{file,"/Users/robert.aloi/git/github/erlang-ls/vscode/erlang_ls/apps/els_lsp/src/els_indexing.erl"},{line,53}]},{els_utils,lookup_document,1,[{file,"/Users/robert.aloi/git/github/erlang-ls/vscode/erlang_ls/apps/els_core/src/els_utils.erl"},{line,151}]},{els_code_navigation,find,4,[{file,"/Users/robert.aloi/git/github/erlang-ls/vscode/erlang_ls/apps/els_lsp/src/els_code_navigation.erl"},{line,155}]},{els_unused_includes_diagnostics,update_unused,4,[{file,"/Users/robert.aloi/git/github/erlang-ls/vscode/erlang_ls/apps/els_lsp/src/els_unused_includes_diagnostics.erl"},{line,88}]},{lists,foldl,3,[{file,"lists.erl"},{line,1267}]},{els_unused_includes_diagnostics,find_unused_includes,1,[{file,"/Users/robert.aloi/git/github/erlang-ls/vscode/erlang_ls/apps/els_lsp/src/els_unused_includes_diagnostics.erl"},{line,82}]},{els_unused_includes_diagnostics,run,1,[{file,"/Users/robert.aloi/git/github/erlang-ls/vscode/erlang_ls/apps/els_lsp/src/els_unused_includes_diagnostics.erl"},{line,38}]}] [els_indexing:try_index_file/2 L156] <0.689.0>
Describe the bug
On Windows, Erlang installs in C:\Program Files\erl-nnn, so it's natural to set _otppath to point to this directory.
In this case, crossref cannot find the specs of stdlib functions, but it can use _otppath to read the header files of other OTP applications.
To Reproduce
Expected behavior
Either spaces should be accepted in _otppath or a notification should be given at erlang_ls startup.
Actual behavior
Context
erlang_ls
version (tag/sha): 0.21.2Note, a workround is possible using the 8.3 name C/:PROGRA~1/erl-nn.