Closed ddowl closed 5 years ago
Hi @ddowl, thanks for reporting!
I think the issue is probably that the file extension there is .ex
instead of .exs
. I'm guessing that's why ElixirLS thinks it's safe to run that code. I don't see any problems with this in VS Code + ElixirLS as long as it's an Elixir script file.
It's also always possible to move the Ratatouille.run(...)
to its own script file and leave the rest in the .ex
file. I've just set the examples up like this for brevity.
Let me know if that solves the issue for you.
Yep! ElixirLS won't execute Ratatouille.run
when it's in a script file. I had no idea! I was getting around it by putting a run
method in my module that just dispatches out, but I like your idea better. Thanks for the tip!
Hello!
As I started up a project in VSCode I found that the ElixirLS plugin marks a copy-paste of the
Counter
example with this error:It seems like ElixirLS is compiling/running the example in the background to check for any errors, but it's not expecting the
Ratatouille.run(Counter)
at the end. This error goes away if I removeRatatouille.run
orimport Ratatouille.View
.I'm not sure if this is due to this library, ElixirLS, or a misconfiguration on my end :man_shrugging:. Let me know if I should redirect this to ElixirLS!