With the newest version 0.3.14 we get the following Dialyzer errors:
lib/myproject/emails/my_first_email.ex:12:no_return
Function my_mail/2 has no local return.
________________________________________________________________________________
lib/myproject/emails/my_second_email.ex:13:no_return
Function my_mail/2 has no local return.
________________________________________________________________________________
lib/myproject/mailer.ex:18:no_return
Function premail/1 has no local return.
________________________________________________________________________________
lib/myproject/workers/my_worker.ex:17:no_return
Function perform/1 has no local return.
________________________________________________________________________________
Main problem here is the premail/1 function. All other errors are follow-up errors of this code:
def premail(email) do
html = Premailex.to_inline_css(email.html_body)
text = Premailex.to_text(email.html_body)
email
|> Swoosh.Email.html_body(html)
|> Swoosh.Email.text_body(text)
end
Given the fact, that this is the exact example from the documentation, i suspect the problem is further down the stack?
If I remove the CSS part, there is no error at all:
def premail(email) do
text = Premailex.to_text(email.html_body)
email
|> Swoosh.Email.text_body(text)
end
With the newest version
0.3.14
we get the following Dialyzer errors:Main problem here is the
premail/1
function. All other errors are follow-up errors of this code:Given the fact, that this is the exact example from the documentation, i suspect the problem is further down the stack?
If I remove the CSS part, there is no error at all: