Hello Elixir friends. We're building "Find References" support <https://github.com/JakeBecker/elixir-ls/pull/50> in ElixirLS (moving it soon to ElixirSense) so that we can find references in our editor. Right now we run the xref mix task and capture stdout <https://github.com/JakeBecker/elixir-ls/pull/50/files#diff-8d43b4c547ca39804384108a24078e2dR45> to get the list of references.
We'd prefer to be able to get the list directly. I'm curious what folks think about exposing something like callers/2 <https://github.com/elixir-lang/elixir/blob/master/lib/mix/lib/mix/tasks/xref.ex#L268> as a public function on the xref task (or elsewhere) that would hand back the list. https://github.com/elixir-lang/elixir/blob/master/lib/mix/lib/mix/tasks/xref.ex#L268 Naively, it could be as simple as a function that includes everything except print_calls() and the :ok return value we see in callers/2. What we have seems to work, so it's not a blocker, but this would definitely be helpful to anyone building IDE features. If this seems like a reasonable add I would be happy to submit a PR, I imagine it will be a small change if folks approve of the idea. -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/6c43f8a4-39cf-4ea7-8da6-fd334e549898%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
