Skip to content

Use metadata in Introspection.actual_mod_fun #61

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

Merged
merged 15 commits into from
Nov 26, 2019

Conversation

lukaszsamson
Copy link
Collaborator

@lukaszsamson lukaszsamson commented Nov 21, 2019

This PR changes order of returned funs - now builtin types are tried after local functions. Previous implementation returned {mod, fun} regardless if the function existed or not. Now metadata is used to verify that.
While working on this i added a few tests and noticed that finding references for imported functions was not working. It turned out that Source.subject_and_pos returned wrong column for the call and there was some inconsistency in how call positions were stored in metadata.
I also had to fix ModuleInfo.get_module_funs as it was crashing when called for erlang modules
Fixes #42
Resolves #43

Copy link
Collaborator

@msaraiva msaraiva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukaszsamson fantastic job! Ship it 🎉

@lukaszsamson lukaszsamson merged commit 4b27cc0 into elixir-lsp:master Nov 26, 2019
axelson added a commit to elixir-lsp/elixir-ls that referenced this pull request Dec 22, 2019
* Bump elixir_sense and use ElixirSense.references/3

Now that elixir-lsp/elixir_sense#42 is fixed (via
elixir-lsp/elixir_sense#61) and umbrella support is
added via elixir-lsp/elixir_sense#46 we no longer need
to maintain a separate implementation of `ElixirSense.references/3` and can
instead use the implementation provided by `ElixirSense`. This is good because
now we're using less of the private internals of `ElixirSense`.

* Map nil uri from ElixirSense to the current file

* Upgrade elixir_sense after infinite loop

* Handle types being an atom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential bug in ElixirSense.Core.Introspection.actual_mod_fun/4
3 participants