-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dialyxir 1.1.0 support #583
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
/.elixir_ls | ||
erl_crash.dump | ||
*.ez | ||
/priv/plts/*.plt | ||
/priv/plts/*.plt.hash |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ | ||
{"lib/bamboo/formatter.ex", :callback_type_mismatch, 73} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know what this warning was about and why we're ignoring it? |
||
] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -39,8 +39,10 @@ defmodule Bamboo.ApiError do | |||||
|
||||||
<extra_message> | ||||||
""" | ||||||
@spec raise_api_error(any()) :: no_return() | ||||||
def raise_api_error(message), do: raise(__MODULE__, message: message) | ||||||
|
||||||
@spec raise_api_error(String.t(), any(), Keyword.t()) :: no_return() | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not 100% sure that the third argument will always be a
Suggested change
|
||||||
def raise_api_error(service_name, response, params, extra_message \\ "") do | ||||||
message = """ | ||||||
There was a problem sending the email through the #{service_name} API. | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,6 +142,7 @@ defmodule Bamboo.Mailer do | |
Email.welcome_email | ||
|> Mailer.deliver_now(config: %{username: "Emma", smtp_port: 2525}) | ||
""" | ||
@spec deliver_now(any()) :: no_return() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about changing the |
||
def deliver_now(_email, _opts \\ []) do | ||
raise @cannot_call_directly_error | ||
end | ||
|
@@ -156,6 +157,7 @@ defmodule Bamboo.Mailer do | |
|
||
On failure, this function returns an error tuple: `{:error, error}`. | ||
""" | ||
@spec deliver_now!(any()) :: no_return() | ||
def deliver_now!(_email, _opts \\ []) do | ||
raise @cannot_call_directly_error | ||
end | ||
|
@@ -174,6 +176,7 @@ defmodule Bamboo.Mailer do | |
|
||
If the email is invalid, this function will return an `{:error, error}` tuple. | ||
""" | ||
@spec deliver_later(any()) :: no_return() | ||
def deliver_later(_email, _opts \\ []) do | ||
raise @cannot_call_directly_error | ||
end | ||
|
@@ -188,6 +191,7 @@ defmodule Bamboo.Mailer do | |
|
||
If the email is invalid, this function raises an error. | ||
""" | ||
@spec deliver_later!(any()) :: no_return() | ||
def deliver_later!(_email, _opts \\ []) do | ||
raise @cannot_call_directly_error | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if it's possible to use the
checksum
here so that the cache is busted when the dependencies change? That way we don't have to manually update this when we update dependencies.We could use the
".tool-versions"
file, since that's the source of truth for Erlang and Elixir versions. So if that file changes, it means we should bust this cache.What do you think? Would it be possible to do this?
And the corresponding change in the
-restore_cache
entry?