Skip to content

Tesla Builder deprecation warning on compilation #184

@ddon

Description

@ddon

Problem

When compiling a project that depends on oauth2, Tesla 1.15+ emits a deprecation warning:

warning: `use Tesla.Builder` and `use Tesla` are soft-deprecated. It will be removed in future major version in favor of
Runtime Configuration instead. Please share your feedback at https://github.com/elixir-tesla/tesla/discussions/732

If you can turn off this warning, add the following to your config.exs:

    config :tesla, disable_deprecated_builder_warning: true

  lib/tesla/builder.ex:9: Tesla.Builder."MACRO-__using__"/2

This warning originates from oauth2's internal use of use Tesla / use Tesla.Builder, and affects all downstream consumers (ueberauth strategies like ueberauth_google, ueberauth_apple, ueberauth_github, ueberauth_facebook, etc.).

Environment

  • oauth2 v2.1.0
  • tesla v1.15.3 (latest: v1.16.0, warning persists)
  • Elixir 1.19.5

Workaround

Downstream apps can suppress the warning with:

config :tesla, disable_deprecated_builder_warning: true

But ideally oauth2 would migrate to Tesla's Runtime Configuration API as described in elixir-tesla/tesla#732.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions