peburrows / goth

Elixir package for Oauth authentication via Google Cloud APIs
http://hexdocs.pm/goth
MIT License
284 stars 108 forks source link

Fix Finch warning after update to 0.17 #167

Closed brosquinha closed 8 months ago

brosquinha commented 8 months ago

Finch, Goth's HTTP client, has just released a new version that deprecates its protocol option in favor of protocols (more details on this decision can be found here). Consequently, once Finch is updated to this new version, the following runtime warning is emitted:

warning: :protocol option is deprecated. Use :protocols instead.
  (nimble_options 1.1.0) lib/nimble_options.ex:572: NimbleOptions.validate_value/3
  (nimble_options 1.1.0) lib/nimble_options.ex:558: NimbleOptions.validate_option/3
  (nimble_options 1.1.0) lib/nimble_options.ex:540: NimbleOptions.reduce_options/2
  (elixir 1.15.7) lib/enum.ex:4830: Enumerable.List.reduce/3
  (elixir 1.15.7) lib/enum.ex:2564: Enum.reduce_while/3
  (nimble_options 1.1.0) lib/nimble_options.ex:533: NimbleOptions.validate_options/2

So, if simply updating Goth's dependency on Finch from version 0.9 to 0.17 is acceptable, then simply updating deps/goth/lib/goth/application.ex fixes the issue. However, Finch is commonly used in various other libraries, so I'm not sure if this approach is desirable, as many dependents projects might not be able to update it. In any case, let me know what you think.

wojtekmach commented 8 months ago

Thank you!

dvic commented 8 months ago

@wojtekmach any chance of cutting a new release? If not, no worries, I'll bump my projects to use the git version.

wojtekmach commented 8 months ago

v1.4.3 is out!