elixir_sense icon indicating copy to clipboard operation
elixir_sense copied to clipboard

Mix.Tasks.Xref.calls deprecation

Open J3RN opened this issue 3 years ago • 1 comments

In ElixirSense.Providers.References, Mix.Tasks.Xref.calls/0 is used to find references to functions. However, the Mix.Tasks.Xref.calls/0 function is now deprecated in favour of the new compilation tracers feature of Elixir 1.10.

Naturally, we'll want to be backwards compatible as much as possible, and may not need to change right away.

That said, the new compilation tracers approach represents some challenges. Namely:

  • The tracer has to be specified as a compiler option before the code to be analysed is compiled. I'm not exactly sure how ElixirSense goes about compiling a guest application (supposing that it does at all), so this may either be very difficult or very easy.
  • From that point forward, the information spat out by the compiler will have to be persisted (maybe an Agent or GenServer?) as it cannot be fetched again without a re-compilation.

I'd be happy to help out with this, but I first wanted to get some input from folks who know more about ElixirSense than I do.

J3RN avatar Sep 21 '20 19:09 J3RN

Yes, we were initially intending to ship it with 1.10 support (due to late bugs in rc xref was not working correctly back then) See POC implementation and discussions in https://github.com/elixir-lsp/elixir_sense/pull/80

lukaszsamson avatar Sep 21 '20 19:09 lukaszsamson

Addressed in https://github.com/elixir-lsp/elixir_sense/pull/160

lukaszsamson avatar Aug 16 '22 22:08 lukaszsamson