elixir_sense
elixir_sense copied to clipboard
Mix.Tasks.Xref.calls deprecation
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.
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
Addressed in https://github.com/elixir-lsp/elixir_sense/pull/160