maennchen
Dialyzer - The created fun has no local return
I’m trying to fix all dialyzer warnings in quantum for the next big release. There are two errors which I’m not able to solve.
The errors are:
lib/quantum.ex:69: The created fun has no local return
lib/quantum/normalizer.ex:37: Function normalize/2 has no local return
Here is the spec which I think is offending dialyzer.
# Quantum.Normalizer.normalize/2
@spec normalize(Job.t, config_full_notation | config_short_notation) :: Job.t | no_return
Involved Files:
- https://github.com/jshmrtn/quantum-elixir/blob/5ace42c7e88ecdb7eb6b0fdea768b430ed18b61d/lib/quantum/normalizer.ex
- https://github.com/jshmrtn/quantum-elixir/blob/5ace42c7e88ecdb7eb6b0fdea768b430ed18b61d/lib/quantum.ex
Steps tried to solve the issue:
- Added
no_returnto the specs return type - Tried to locate a specific function that causes the problem
Both steps were not succesfull.
The current progress can be seen in this WIP PR: https://github.com/c-rack/quantum-elixir/pull/255
Most Liked
dom
no_return means there is no local return whatsoever, the function can only crash or loop infinitely. If the function can return a value in at least one code path, then it should not be labeled no_return.
1
Popular in Questions
Hello, I get Persian date from my client and convert it to normal calendar like this:
def jalali_string_to_miladi_english_number(persi...
New
can someone please explain to me how Enum.reduce works with maps
New
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this:
...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I'm writing a test for one of t...
New
Student & New to elixir. Nice language.
I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
In AR this is so simple
@articles = current_user.articles
How to do in Ecto?
def index(conn, _params) do
current_user = conn.assig...
New
Other popular topics
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New







