Closed
Description
Diagnostics returned for eex files in an umbrella app have the wrong path
For a line with a compilation error: <% IO.puts() %>
in /home/jason/dev/tmp/hello_phoenix_umbrella/apps/hello_phoenix_web/lib/hello_phoenix_web/templates/page/index.html.eex
This diagnostic is returned:
{
"resource": "/home/jason/dev/tmp/hello_phoenix_umbrella/lib/hello_phoenix_web/templates/page/index.html.eex",
"owner": "_generated_diagnostic_collection_name_#0",
"severity": 4,
"message": "IO.puts/0 is undefined or private. Did you mean one of:\n\n * puts/1\n * puts/2",
"source": "Elixir",
"startLineNumber": 4,
"startColumn": 1,
"endLineNumber": 4,
"endColumn": 1
}
Instead the resource path should be /home/jason/dev/tmp/hello_phoenix_umbrella/apps/hello_phoenix_web/lib/hello_phoenix_web/templates/page/index.html.eex
Note: the Elixir compiler may be returning just lib/hello_phoenix_web/templates/page/index.html.eex
In my testing this only applies to EEx templates, diagnostics in normal .ex files appears to be fine.
Related: #241