Skip to content
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

Compiler diagnostics for .exs files #89

Closed
amencarini opened this issue Jan 5, 2020 · 11 comments
Closed

Compiler diagnostics for .exs files #89

amencarini opened this issue Jan 5, 2020 · 11 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@amencarini
Copy link

Environment

  • Elixir & Erlang versions (elixir --version): 1.9.4, 22
  • Operating system: macOS 10.14.6
  • Client (editor or IDE): VS Code

Not sure if this is by design, but I'm not getting any hints when things are broken in .exs files. e.g.: If I have a typo calling a function in a test, this doesn't get reported in VS Code, I'll only notice when running the tests.

@axelson
Copy link
Member

axelson commented Jan 6, 2020

Hi @amencarini that is a known issue due to since .exs files are not handled the same as .ex files. It would probably be good to list this as a known issue on the readme.

@amencarini
Copy link
Author

While I understand .exs files aren't part of the compiled beam files, it would be great to have some feedback when you're referring incorrectly, say from a test, to a function that's part of the compiled beam files. Is this something that can be addressed at all? (I'm asking as I don't understand this well enough, not trying to demand this sorted 🙂)

@axelson
Copy link
Member

axelson commented Jan 11, 2020

Offhand I'm not sure what would be involved in returning compilation errors for .exs files, but if you or anyone else would like to take a stab at supporting that, that would be very helpful!

@lukaszsamson lukaszsamson changed the title No output in VS Code for tests Compiler diagnostics for .exs files Nov 28, 2020
@lukaszsamson lukaszsamson added enhancement New feature or request help wanted Extra attention is needed labels Nov 28, 2020
@lukaszsamson
Copy link
Collaborator

There may be a resolution coming up upstream elixir-lang/elixir#10983

@lpender
Copy link

lpender commented Aug 5, 2021

Hi!

Any known workarounds?

Just wanted to point out -- this isn't just tests. For a file like releases.exs, if you're missing comma you don't find out until you're deploying.

Thanks!

@lukaszsamson
Copy link
Collaborator

lukaszsamson commented Aug 5, 2021 via email

@lpender
Copy link

lpender commented Aug 5, 2021

Thanks. Any specific "how to" would be most welcome!

@kimko
Copy link

kimko commented Sep 21, 2021

As a workaround you can change your mixfile and force elixir to compile them.

+1 how do you force mix to compile the .exs files?

Thx!!

@josevalim
Copy link

For .exs files, you can at least call Code.string_to_quoted to parse it and get at least syntax feedback.

@lukaszsamson
Copy link
Collaborator

For .exs files, you can at least call Code.string_to_quoted to parse it and get at least syntax feedback.

That's a good idea @josevalim

@lukaszsamson
Copy link
Collaborator

Parser diagnostics has been added in #986. Full compiler diagnostics are unlikely as it would require evaluating the client code in the context of language server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants