-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Replace Finch for Req as default swoosh client in installer #5882
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 |
---|---|---|
|
@@ -55,8 +55,8 @@ defmodule <%= @app_module %>.MixProject do | |
app: false, | ||
compile: false, | ||
depth: 1},<% end %><%= if @mailer do %> | ||
{:swoosh, "~> 1.5"}, | ||
{:finch, "~> 0.13"},<% end %> | ||
{:swoosh, "~> 1.16"}, | ||
{:req, "~> 0.5.4"},<% end %> | ||
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. Just so you know, I'm considering some changes before Req v1.0 that are maybe worth mentioning here:
Btw, Finch is dropping
Dunno how relevant are these for Phoenix but I thought Id mentioned it anyway! 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. Both Swoosh and Phoenix depends on Jason, so making it optional on Req won't affect us. I also don't think OTP 25 requirement is an issue, this is for new projects and that's the minimum supported OTP version nowadays anyway. 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. Regarding req retries by default and swoosh, this is all moot, sorry about the noise. In req the default is retry: :safe_transient, safe meaning only for GET/HEAD requests. Sending emails would be typically done using POST. So we are good. |
||
{:telemetry_metrics, "~> 1.0"}, | ||
{:telemetry_poller, "~> 1.0"},<%= if @gettext do %> | ||
{:gettext, "~> 0.20"},<% end %> | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -41,8 +41,8 @@ defmodule <%= @app_module %>.MixProject do | |||||
{:ecto_sql, "~> 3.10"}, | ||||||
{:<%= @adapter_app %>, ">= 0.0.0"}, | ||||||
{:jason, "~> 1.2"}<% end %><%= if @mailer do %>, | ||||||
{:swoosh, "~> 1.5"}, | ||||||
{:finch, "~> 0.13"}<% end %> | ||||||
{:swoosh, "~> 1.16"}, | ||||||
{:req, "~> 0.5.4"}<% end %> | ||||||
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.
Suggested change
|
||||||
] | ||||||
end | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,7 @@ config :<%= @web_app_name %>, <%= @endpoint_module %>, | |
# domain: System.get_env("MAILGUN_DOMAIN") | ||
# | ||
# For this example you need include a HTTP client required by Swoosh API client. | ||
# Swoosh supports Hackney and Finch out of the box: | ||
# Swoosh supports Hackney, Req and Finch out of the box: | ||
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. Perhaps we should just remove this section from the docs? We already config a client for prod anyway? 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. Agreed, keep the part about configuring the adopter, drop the part about the HTTP Client. |
||
# | ||
# config :swoosh, :api_client, Swoosh.ApiClient.Hackney | ||
# | ||
|
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.
We can probably relax it a bit?
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.
I went for 0.5.x because I thought 0.6 may introduce breaking changes. Happy to go with either though.
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.
As you prefer! It is only for new apps and there will be a lock file anyway. And we can always update it.