Skip to content

fix: avoid soft-deprecated warning logs when compiling tesla itself#834

Merged
yordis merged 1 commit intoelixir-tesla:masterfrom
entertainyou:master
Mar 18, 2026
Merged

fix: avoid soft-deprecated warning logs when compiling tesla itself#834
yordis merged 1 commit intoelixir-tesla:masterfrom
entertainyou:master

Conversation

@entertainyou
Copy link
Copy Markdown
Contributor

Tesla generates a soft-deprecated warning log when it is compiled as a dependency.

@yordis
Copy link
Copy Markdown
Member

yordis commented Mar 18, 2026

@entertainyou can you share under what conditions this happened? Also notice that CI is failing

@entertainyou
Copy link
Copy Markdown
Contributor Author

@yordis This is to fix warning log when tesla is compiled, you can reproduce by run mix compile in this simple mix repository https://github.com/entertainyou/tesla_warning_repo , the repository is a very simple mix project with tesla as a dependency.

==> tesla
Compiling 40 files (.ex)
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:

```elixir
config :tesla, disable_deprecated_builder_warning: true
```

  lib/tesla/builder.ex:9: Tesla.Builder."MACRO-__using__"/2
  (elixir 1.19.5) src/elixir_dispatch.erl:257: :elixir_dispatch.expand_macro_fun/7
  (elixir 1.19.5) src/elixir_dispatch.erl:149: :elixir_dispatch.dispatch_require/7
  (elixir 1.19.5) src/elixir_expand.erl:636: :elixir_expand.expand_block/5
  (elixir 1.19.5) src/elixir_expand.erl:52: :elixir_expand.expand/3
  (elixir 1.19.5) src/elixir_dispatch.erl:271: :elixir_dispatch.expand_quoted/7

@entertainyou
Copy link
Copy Markdown
Contributor Author

I think CI failed because of the commit message. I've updated the commit message .

@yordis
Copy link
Copy Markdown
Member

yordis commented Mar 18, 2026

Oooooh 😄

@yordis yordis changed the title Avoid soft-deprecated warning logs when compiling tesla itself fix: avoid soft-deprecated warning logs when compiling tesla itself Mar 18, 2026
@yordis
Copy link
Copy Markdown
Member

yordis commented Mar 18, 2026

Why CI is failing? 😭

@yordis yordis merged commit ab82264 into elixir-tesla:master Mar 18, 2026
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants