Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paths resolved by configuration include symlinks #339

Closed
jfacorro opened this issue Dec 20, 2019 · 0 comments · Fixed by #346
Closed

Paths resolved by configuration include symlinks #339

jfacorro opened this issue Dec 20, 2019 · 0 comments · Fixed by #346
Labels
bug Something isn't working

Comments

@jfacorro
Copy link
Contributor

Describe the bug
In a rebar3 project when building diferent profiles, there are a lot of symlinks created.

The path resolution used when loading the configuration for the server does not take into account if the directory resolved contains a symlink. The resolved list of paths is then used by the indexer, which does check for symlink but by that time it's too late.

To Reproduce
Use erlang_ls with erlang_ls in debug mode. Connect to the node and evaluate the following in the shell:

1> els_utils:find_module(lager).
** exception error: no case clause matching [<<"file:///Users/juan.facorro/dev/erlang-ls/erlang_ls/_build/debug/lib/lager/src/lager.erl">>,
                                             <<"file:///Users/juan.facorro/dev/erlang-ls/erlang_ls/_build/default/lib/lager/src/lager.erl">>,
                                             <<"file:///Users/juan.facorro/dev/erlang-ls/erlang_ls/_build/test/lib/lager/src/lager.erl">>]
     in function  els_utils:find_module/1 (/Users/juan.facorro/dev/erlang-ls/erlang_ls/src/els_utils.erl, line 33)

Expected behavior
Each module is indexed only once.

Actual behavior
Same modules indexed multiple times.

Context

  • erlang_ls version (tag/sha): e0172e3
  • Editor used: Emacs 26.3
  • LSP client used: lsp-mode 20191219.1032
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant