# \#warnings

**URL:** https://forum.elixirforum.com/tag/warnings/124.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [What should I do to my library so that Elixir 1.19 and 1.20 do not produce warnings on libraries that implement behaviours?](https://forum.elixirforum.com/t/what-should-i-do-to-my-library-so-that-elixir-1-19-and-1-20-do-not-produce-warnings-on-libraries-that-implement-behaviours/75578)

<div class="topic-metadata">

**Author:** [@bugnano](https://forum.elixirforum.com/u/bugnano)\
**Replies:** 2\
**Last updated:** [June 5, 2026, 7:23am UTC](https://forum.elixirforum.com/t/what-should-i-do-to-my-library-so-that-elixir-1-19-and-1-20-do-not-produce-warnings-on-libraries-that-implement-behaviours/75578 "2026-06-05T07:23:36Z")

</div>

Hello everyone. I’m the author of GitHub - bugnano/wtransport-elixir: Elixir bindings for the WTransport WebTransport library · GitHub , a library that allows to implement WebTransport servers in Elixir. Now, the way t…

---

## [Is it necessary to warn about the @doc attribute for a private function](https://forum.elixirforum.com/t/is-it-necessary-to-warn-about-the-doc-attribute-for-a-private-function/19187)

<div class="topic-metadata">

**Author:** [@jeramyRR](https://forum.elixirforum.com/u/jeramyRR)\
**Replies:** 52\
**Last updated:** [July 24, 2025, 1:10pm UTC](https://forum.elixirforum.com/t/is-it-necessary-to-warn-about-the-doc-attribute-for-a-private-function/19187 "2025-07-24T13:10:25Z")

</div>

Is it really necessary for the compiler to spit out a warning about using @doc with private functions? I don’t want to have to document my functions in two different ways. I want one clean way to present my comments to…

---

## [Elixir v1.19 then compile warning](https://forum.elixirforum.com/t/elixir-v1-19-then-compile-warning/71333)

<div class="topic-metadata">

**Author:** [@ken-kost](https://forum.elixirforum.com/u/ken-kost)\
**Replies:** 1\
**Last updated:** [June 18, 2025, 11:06am UTC](https://forum.elixirforum.com/t/elixir-v1-19-then-compile-warning/71333 "2025-06-18T11:06:15Z")

</div>

Following this and I’m wondering the deets about it. :nerd\_face: I made a simple recreation: def hello(map) do map |\> Map.to\_list() |\> Enum.reduce\_while(%{}, fn {key, value}, acc -\> if value == 2 do…

---

## [GitHub Actions-compatible compiler warnings/errors](https://forum.elixirforum.com/t/github-actions-compatible-compiler-warnings-errors/67719)

<div class="topic-metadata">

**Author:** [@a.shaw](https://forum.elixirforum.com/u/a.shaw)\
**Replies:** 2\
**Last updated:** [November 27, 2024, 3:26pm UTC](https://forum.elixirforum.com/t/github-actions-compatible-compiler-warnings-errors/67719 "2024-11-27T15:26:30Z")

</div>

When running Dialyzer in CI, we use the --format github option. This formats errors like: ::warning file=lib/file.ex,line=19,title=no\_return::Function fail/0 has no local return. This allows GitHub Actions to parse the…

---

## [Raise a warning when a mix task is used without \`use Mix.Task\`](https://forum.elixirforum.com/t/raise-a-warning-when-a-mix-task-is-used-without-use-mix-task/65619)

<div class="topic-metadata">

**Author:** [@RobinBoers](https://forum.elixirforum.com/u/RobinBoers)\
**Replies:** 0\
**Last updated:** [August 22, 2024, 10:18am UTC](https://forum.elixirforum.com/t/raise-a-warning-when-a-mix-task-is-used-without-use-mix-task/65619 "2024-08-22T10:18:20Z")

</div>

Hi. We had a few issues in our project regarding mix tasks, where we expected the items in the @requirements module tag to have been executed, but they hadn’t been because we forgot to add use Mix.Task at the top of the …

---

## [Add a way to supress "matching on 0.0" warning](https://forum.elixirforum.com/t/add-a-way-to-supress-matching-on-0-0-warning/64883)

<div class="topic-metadata">

**Author:** [@maxpohlmann](https://forum.elixirforum.com/u/maxpohlmann)\
**Replies:** 4\
**Last updated:** [July 12, 2024, 6:43pm UTC](https://forum.elixirforum.com/t/add-a-way-to-supress-matching-on-0-0-warning/64883 "2024-07-12T18:43:19Z")

</div>

In our application, we have many structs that contain lists of floats and, especially in test, we often use pattern matching on these objects. (I know, not optimal, but it works for our purposes.) Since upgrading to Elix…

---

## [Handling Elixir 1.17 compiler warnings on unused optional dependencies](https://forum.elixirforum.com/t/handling-elixir-1-17-compiler-warnings-on-unused-optional-dependencies/64882)

<div class="topic-metadata">

**Author:** [@fhunleth](https://forum.elixirforum.com/u/fhunleth)\
**Replies:** 2\
**Last updated:** [July 12, 2024, 3:17pm UTC](https://forum.elixirforum.com/t/handling-elixir-1-17-compiler-warnings-on-unused-optional-dependencies/64882 "2024-07-12T15:17:42Z")

</div>

I’m trying to reduce the number of Elixir 1.17 warnings in my projects, and I have questions with optional dependencies. One example that triggers a new warning is Jason’s optional dependency on Decimal. If you create a…

---

## [How to get rid of "this check/guard will always yield the same result"?](https://forum.elixirforum.com/t/how-to-get-rid-of-this-check-guard-will-always-yield-the-same-result/63866)

<div class="topic-metadata">

**Author:** [@lkuty](https://forum.elixirforum.com/u/lkuty)\
**Replies:** 5\
**Last updated:** [May 30, 2024, 3:43pm UTC](https://forum.elixirforum.com/t/how-to-get-rid-of-this-check-guard-will-always-yield-the-same-result/63866 "2024-05-30T15:43:58Z")

</div>

I have predicates that rely on the @dev and @prod module attributes to know in which environment we’re in. In config/dev.exs, I have the following configuration among other things: config :myapp, dev: true, prod: …

---

## [Hide warning ExUnit](https://forum.elixirforum.com/t/hide-warning-exunit/63528)

<div class="topic-metadata">

**Author:** [@SoftTransistor](https://forum.elixirforum.com/u/SoftTransistor)\
**Replies:** 1\
**Last updated:** [May 13, 2024, 10:04am UTC](https://forum.elixirforum.com/t/hide-warning-exunit/63528 "2024-05-13T10:04:44Z")

</div>

Hello, I’m using the ExUnit module to run some test on a project I’m currently developing. I’m still in the early phase of writing the code and defined a bunch that is not used for now but will be. My problem is that is…

---

## [Dialyzer warning on default implementation raising (when not overriden)](https://forum.elixirforum.com/t/dialyzer-warning-on-default-implementation-raising-when-not-overriden/55199)

<div class="topic-metadata">

**Author:** [@DaAnalyst](https://forum.elixirforum.com/u/DaAnalyst)\
**Replies:** 6\
**Last updated:** [November 28, 2023, 4:14pm UTC](https://forum.elixirforum.com/t/dialyzer-warning-on-default-implementation-raising-when-not-overriden/55199 "2023-11-28T16:14:46Z")

</div>

The following is a snippet depicting my use case: defmodule Abstract do @callback foo() :: binary() defmacro \_\_using\_\_( \_) do quote do @behavior Abstract @impl true def foo() do rais…

---

## [Warnings : ElixirLS Dialyzer The function call will not succeed](https://forum.elixirforum.com/t/warnings-elixirls-dialyzer-the-function-call-will-not-succeed/59597)

<div class="topic-metadata">

**Author:** [@rakeshtripathy](https://forum.elixirforum.com/u/rakeshtripathy)\
**Replies:** 4\
**Last updated:** [November 15, 2023, 5:45am UTC](https://forum.elixirforum.com/t/warnings-elixirls-dialyzer-the-function-call-will-not-succeed/59597 "2023-11-15T05:45:32Z")

</div>

The function call will not succeed. ExInsights.track\_exception( \_ :: %{:\_\_exception\_\_ =\> true, :\_\_struct\_\_ =\> atom(), atom() =\> \_}, \_ :: \[{atom(), atom(), \[any()\] | byte(), \[{:file, string()} | {:line, pos\_integer()…

---

## [Deprecation warnings and warnings as errors](https://forum.elixirforum.com/t/deprecation-warnings-and-warnings-as-errors/58543)

<div class="topic-metadata">

**Author:** [@xpg](https://forum.elixirforum.com/u/xpg)\
**Replies:** 2\
**Last updated:** [September 28, 2023, 7:03pm UTC](https://forum.elixirforum.com/t/deprecation-warnings-and-warnings-as-errors/58543 "2023-09-28T19:03:37Z")

</div>

I generally enable warnings\_as\_errors in order to have the compiler fail hard in situations like invoking non-existing remote functions. This worked well, until I started using @deprecated. As far as I see it, I now hav…

---

## [Can I disable warnings about undefined assigns with EEx.compile\_file/2 and Code.eval\_quoted/3?](https://forum.elixirforum.com/t/can-i-disable-warnings-about-undefined-assigns-with-eex-compile-file-2-and-code-eval-quoted-3/58069)

<div class="topic-metadata">

**Author:** [@geo](https://forum.elixirforum.com/u/geo)\
**Replies:** 0\
**Last updated:** [September 4, 2023, 3:36am UTC](https://forum.elixirforum.com/t/can-i-disable-warnings-about-undefined-assigns-with-eex-compile-file-2-and-code-eval-quoted-3/58069 "2023-09-04T03:36:00Z")

</div>

I’m working on doing some external file compilations and am wondering if I can somehow disable warnings about unavailable assigns. Why the heck would I want that?! As I describe what I’m doing hopefully either 1) the ans…

---

## [Warnings Show Up after each Query to the Server after Upgrading to elixir 1.15.1](https://forum.elixirforum.com/t/warnings-show-up-after-each-query-to-the-server-after-upgrading-to-elixir-1-15-1/56955)

<div class="topic-metadata">

**Author:** [@PaulRusuTibreanu](https://forum.elixirforum.com/u/PaulRusuTibreanu)\
**Replies:** 0\
**Last updated:** [July 10, 2023, 1:15pm UTC](https://forum.elixirforum.com/t/warnings-show-up-after-each-query-to-the-server-after-upgrading-to-elixir-1-15-1/56955 "2023-07-10T13:15:27Z")

</div>

After updating to elixir 1.15.1, the phoenix server warnings are emitted after every query, making it impossible to debug. Is there a way to not show the warnings in the console of type: warning: unused alias Repo lib/…

---

## [Treat runtime warnings from dependency as errors](https://forum.elixirforum.com/t/treat-runtime-warnings-from-dependency-as-errors/54203)

<div class="topic-metadata">

**Author:** [@RudManusachi](https://forum.elixirforum.com/u/RudManusachi)\
**Replies:** 0\
**Last updated:** [February 28, 2023, 11:21pm UTC](https://forum.elixirforum.com/t/treat-runtime-warnings-from-dependency-as-errors/54203 "2023-02-28T23:21:17Z")

</div>

After upgrading phoenix to 1.7 it started throwing runtime warnings whenever templates with deprecated syntax is rendered. That happens during runtime. Also it pollutes mix test’s output with those warnings anytime when…

---

## [How to disable "redefining" warning?](https://forum.elixirforum.com/t/how-to-disable-redefining-warning/53342)

<div class="topic-metadata">

**Author:** [@hst337](https://forum.elixirforum.com/u/hst337)\
**Replies:** 2\
**Last updated:** [January 22, 2023, 10:07pm UTC](https://forum.elixirforum.com/t/how-to-disable-redefining-warning/53342 "2023-01-22T22:07:53Z")

</div>

When calling Code.compile\_quoted which recompiles existing module I constantly get this warning: warning: redefining module TheModule (current version loaded from \_build/dev/lib/defbug/ebin/Elixir.TheModule.beam) I’ve …

---

## [Is there any tooling to autofix certain compiler warnings?](https://forum.elixirforum.com/t/is-there-any-tooling-to-autofix-certain-compiler-warnings/31140)

<div class="topic-metadata">

**Author:** [@simonsmith](https://forum.elixirforum.com/u/simonsmith)\
**Replies:** 3\
**Last updated:** [December 9, 2022, 5:19am UTC](https://forum.elixirforum.com/t/is-there-any-tooling-to-autofix-certain-compiler-warnings/31140 "2022-12-09T05:19:48Z")

</div>

Hi, Most of my compile warnings are things like unused variables which just need \_ prepending to or unused functions, is there any tooling out there which will auto fix these on compile?

---

## [How to suppress specific warnings](https://forum.elixirforum.com/t/how-to-suppress-specific-warnings/47023)

<div class="topic-metadata">

**Author:** [@bartblast](https://forum.elixirforum.com/u/bartblast)\
**Replies:** 0\
**Last updated:** [April 4, 2022, 9:46am UTC](https://forum.elixirforum.com/t/how-to-suppress-specific-warnings/47023 "2022-04-04T09:46:05Z")

</div>

Let’s say that I use some code that triggers a warning, but assume that I know what I’m doing and the code that I use is intentional and in normal situation should generate a warning. Example: I dynamically redefine a …

---

## [Suppress specific warnings?](https://forum.elixirforum.com/t/suppress-specific-warnings/46862)

<div class="topic-metadata">

**Author:** [@James\_E](https://forum.elixirforum.com/u/James_E)\
**Replies:** 1\
**Last updated:** [March 28, 2022, 1:08pm UTC](https://forum.elixirforum.com/t/suppress-specific-warnings/46862 "2022-03-28T13:08:38Z")

</div>

In the specific case of Bitwise.bxor/2’s use in a function I have, I find the operator notation more readable than the function notation. defp exchange\_bits({a, b}, mask) do c = (a ^^^ b) &&& mask {(a ^^^ c), …

---

## [Undefined module warnings for mix-compiled erlang code](https://forum.elixirforum.com/t/undefined-module-warnings-for-mix-compiled-erlang-code/45679)

<div class="topic-metadata">

**Author:** [@UmbertoCorponi](https://forum.elixirforum.com/u/UmbertoCorponi)\
**Replies:** 0\
**Last updated:** [January 31, 2022, 3:00pm UTC](https://forum.elixirforum.com/t/undefined-module-warnings-for-mix-compiled-erlang-code/45679 "2022-01-31T15:00:36Z")

</div>

Hi all! I’m quite a new entry in the elixir community, and coming from erlang i found an issue integrating a mixed erlang/elixir codebase. When i compile elixir code calling an non-existing module defmodule Xxx do …

---

## [How do I overload @doc strings?](https://forum.elixirforum.com/t/how-do-i-overload-doc-strings/41084)

<div class="topic-metadata">

**Author:** [@TomHale](https://forum.elixirforum.com/u/TomHale)\
**Replies:** 3\
**Last updated:** [July 23, 2021, 2:47pm UTC](https://forum.elixirforum.com/t/how-do-i-overload-doc-strings/41084 "2021-07-23T14:47:10Z")

</div>

I’m trying to work around the following warning: warning: redefining @doc attribute previously set at line 78. Please remove the duplicate docs. If instead you want to override a previously defined @doc, attach the @do…

---

## [Ommit Warnings for Code.eval && EEx.eval](https://forum.elixirforum.com/t/ommit-warnings-for-code-eval-eex-eval/38558)

<div class="topic-metadata">

**Author:** [@amnu3387](https://forum.elixirforum.com/u/amnu3387)\
**Replies:** 2\
**Last updated:** [March 29, 2021, 4:15pm UTC](https://forum.elixirforum.com/t/ommit-warnings-for-code-eval-eex-eval/38558 "2021-03-29T16:15:11Z")

</div>

Hi, is there any way to prevent warnings from being emitted when using Code.eval\_string and EEx.eval\_string ? Thx

---

## [How to get rid off a warning about module being undefined when module is in a script .exs file? (from \[Programming Phoenix 1.4\])](https://forum.elixirforum.com/t/how-to-get-rid-off-a-warning-about-module-being-undefined-when-module-is-in-a-script-exs-file-from-programming-phoenix-1-4/29904)

<div class="topic-metadata">

**Author:** [@Sanjibukai](https://forum.elixirforum.com/u/Sanjibukai)\
**Replies:** 11\
**Last updated:** [March 25, 2021, 2:09pm UTC](https://forum.elixirforum.com/t/how-to-get-rid-off-a-warning-about-module-being-undefined-when-module-is-in-a-script-exs-file-from-programming-phoenix-1-4/29904 "2021-03-25T14:09:27Z")

</div>

Hello everybody, I’m following along the Programming Phoenix 1.4 Book. And at a moment we have the following simple code that do an HTTP request using erlang :httpc (excerpt simplified): defp fetch\_data(url) do {:ok…

---

## [Mix warning won't resolve](https://forum.elixirforum.com/t/mix-warning-wont-resolve/35801)

<div class="topic-metadata">

**Author:** [@b1az](https://forum.elixirforum.com/u/b1az)\
**Replies:** 11\
**Last updated:** [March 23, 2021, 10:35am UTC](https://forum.elixirforum.com/t/mix-warning-wont-resolve/35801 "2021-03-23T10:35:33Z")

</div>

I’m still getting "a previous clause at line 1 always matches" warning below, even though I long ago removed the .ex file that was re-defining the problematic DefineMessage module from exprotobuf: \> mix deps.compile \> m…

---

## [Compilation warning about dependency that is already specified](https://forum.elixirforum.com/t/compilation-warning-about-dependency-that-is-already-specified/36765)

<div class="topic-metadata">

**Author:** [@amarandon](https://forum.elixirforum.com/u/amarandon)\
**Replies:** 0\
**Last updated:** [January 11, 2021, 11:00am UTC](https://forum.elixirforum.com/t/compilation-warning-about-dependency-that-is-already-specified/36765 "2021-01-11T11:00:38Z")

</div>

Hi! I have an app that use a pagination library called scrivener\_html. With Elixir 1.11 it trigger a bunch of compilation warnings like this: warning: Phoenix.Naming.resource\_name/1 defined in application :phoenix is us…

---

## [How to fix Elixir's 1.11 application boundaries?](https://forum.elixirforum.com/t/how-to-fix-elixirs-1-11-application-boundaries/35383)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 9\
**Last updated:** [November 5, 2020, 10:20pm UTC](https://forum.elixirforum.com/t/how-to-fix-elixirs-1-11-application-boundaries/35383 "2020-11-05T22:20:49Z")

</div>

Elixir’s new version has a new compiler check specified here: link After upgrading Elixir, now I receive a lot of these compiler warnings, some are related to my project dependencies and are easy to fix, but how do I fi…

---

## [Resolving warnings about \`:restart\` and \`:shutdown\` options being deprecated for \`Task.Supervisor.start\_link/1\`](https://forum.elixirforum.com/t/resolving-warnings-about-restart-and-shutdown-options-being-deprecated-for-task-supervisor-start-link-1/33555)

<div class="topic-metadata">

**Author:** [@kenny-evitt](https://forum.elixirforum.com/u/kenny-evitt)\
**Replies:** 1\
**Last updated:** [August 4, 2020, 11:26pm UTC](https://forum.elixirforum.com/t/resolving-warnings-about-restart-and-shutdown-options-being-deprecated-for-task-supervisor-start-link-1/33555 "2020-08-04T23:26:26Z")

</div>

I’m testing upgrading my app to Elixir 1.10.x. I’m seeing three of these warnings when my app starts (in :dev): warning: :restart and :shutdown options in Task.Supervisor.start\_link/1 are deprecated. Please pass those o…

---

## [Any way to automatically prefix unused variables with underscore?](https://forum.elixirforum.com/t/any-way-to-automatically-prefix-unused-variables-with-underscore/32461)

<div class="topic-metadata">

**Author:** [@baldwindavid](https://forum.elixirforum.com/u/baldwindavid)\
**Replies:** 1\
**Last updated:** [June 18, 2020, 9:12pm UTC](https://forum.elixirforum.com/t/any-way-to-automatically-prefix-unused-variables-with-underscore/32461 "2020-06-18T21:12:08Z")

</div>

I’ve jumped back into my first Elixir project and noticed that there are a lot of unused variable warnings. Is there a script that might be able to prefix with an underscore en masse? Additionally, I tend to use quite a…

---

## [How to get rid of unused variable warning when replacing implementation with a macro?](https://forum.elixirforum.com/t/how-to-get-rid-of-unused-variable-warning-when-replacing-implementation-with-a-macro/30300)

<div class="topic-metadata">

**Author:** [@mikunn](https://forum.elixirforum.com/u/mikunn)\
**Replies:** 8\
**Last updated:** [April 2, 2020, 2:28pm UTC](https://forum.elixirforum.com/t/how-to-get-rid-of-unused-variable-warning-when-replacing-implementation-with-a-macro/30300 "2020-04-02T14:28:27Z")

</div>

I’m trying to replace a little functionality with a fake one in dev, while every other environment must use the default one. For security reasons, I don’t want the call to the fake functionality even exist in production,…

---

## [Why does the Elixir compiler show a warning for a variable in a list?](https://forum.elixirforum.com/t/why-does-the-elixir-compiler-show-a-warning-for-a-variable-in-a-list/28277)

<div class="topic-metadata">

**Author:** [@nikody](https://forum.elixirforum.com/u/nikody)\
**Replies:** 5\
**Last updated:** [January 16, 2020, 10:36am UTC](https://forum.elixirforum.com/t/why-does-the-elixir-compiler-show-a-warning-for-a-variable-in-a-list/28277 "2020-01-16T10:36:00Z")

</div>

This is not really a problem as much as something that I found a bit baffling. I found code similar to the following in an ExUnit test as a part of a Phoenix application: strawberry = strawberry\_fixture() # creates a…

[Next page](https://forum.elixirforum.com/tag/warnings/124.md?match_all_tags=true&page=1&tags%5B%5D=warnings)
