Skip to content

Commit ab82264

Browse files
authored
fix: avoid soft-deprecated warning logs when compiling tesla itself (#834)
1 parent 3519c4d commit ab82264

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/tesla/builder.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ defmodule Tesla.Builder do
77
defmacro __using__(opts \\ []) do
88
caller_module = __CALLER__.module
99

10-
if not Application.get_env(:tesla, :disable_deprecated_builder_warning, false) do
10+
if caller_module != Tesla and
11+
not Application.get_env(:tesla, :disable_deprecated_builder_warning, false) do
1112
IO.warn("""
1213
`use Tesla.Builder` and `use Tesla` in #{inspect(caller_module)} are soft-deprecated. \
1314
It will be removed in future major version in favor of

0 commit comments

Comments
 (0)