Skip to content

Commit b8fb158

Browse files
authored
fix: include caller module name in use Tesla deprecation warning (#832)
1 parent 38e209a commit b8fb158

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/tesla/builder.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ defmodule Tesla.Builder do
55
@body ~w(post put patch)a
66

77
defmacro __using__(opts \\ []) do
8+
caller_module = __CALLER__.module
9+
810
if not Application.get_env(:tesla, :disable_deprecated_builder_warning, false) do
911
IO.warn("""
10-
`use Tesla.Builder` and `use Tesla` are soft-deprecated. It will be removed in future major version in favor of
12+
`use Tesla.Builder` and `use Tesla` in #{inspect(caller_module)} are soft-deprecated. \
13+
It will be removed in future major version in favor of
1114
Runtime Configuration instead. Please share your feedback at https://github.com/elixir-tesla/tesla/discussions/732
1215
1316
If you can turn off this warning, add the following to your config.exs:

0 commit comments

Comments
 (0)