DEV Community

Will Ceolin
Will Ceolin

Posted on

1

How to clear Elixir warnings on VSCode

After making changes to my Phoenix project, VSCode often gives me warnings:

  • Phoenix.LiveView.TagEngine.component/3 defined in application :phoenix_live_view is used by the current application but the current application does not depend on :phoenix_live_view.
  • Invalid type specification for function coming from the ElixirLS Dialyzer.
  • And other warnings that I don't remember now.

Here are some the things that help me to clear those warnings on VSCode:

  • Delete the _build, .elixir_ls and deps directories.
  • Reinstall dependencies: mix deps.get
  • With an .ex file open, go to the Command Palette (Cmd + Shift + P) and run these commands: Elixir: Trigger mix clean --deps in language server and Elixir: Restart language server, then restart VSCode.

If Elixir (not VSCode) starts complaining about routes not found, then you can delete the _build directory and compile your project again (mix compile).

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay