Skip to content

fix: include caller module name in use Tesla deprecation warning#832

Merged
yordis merged 1 commit intoelixir-tesla:masterfrom
mehiel:fix/deprecation-warning-include-module-name
Mar 6, 2026
Merged

fix: include caller module name in use Tesla deprecation warning#832
yordis merged 1 commit intoelixir-tesla:masterfrom
mehiel:fix/deprecation-warning-include-module-name

Conversation

@mehiel
Copy link
Copy Markdown
Contributor

@mehiel mehiel commented Mar 6, 2026

The deprecation warning for use Tesla / use Tesla.Builder now includes the name of the module invoking the macro, making it easier to locate and migrate deprecated usages in large codebases.

The deprecation warning for `use Tesla` / `use Tesla.Builder` now
includes the name of the module invoking the macro, making it easier
to locate and migrate deprecated usages in large codebases.

Made-with: Cursor
Copilot AI review requested due to automatic review settings March 6, 2026 08:15
@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 6, 2026

PR Summary

Low Risk
Low risk: changes only the deprecation warning text by interpolating __CALLER__.module, with no effect on runtime request behavior.

Overview
Improves the deprecation warning emitted by Tesla.Builder.__using__/1 to include the calling module name (via __CALLER__.module), making deprecated use Tesla/use Tesla.Builder usages easier to locate in larger codebases.

Written by Cursor Bugbot for commit d4da0dc. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Tesla’s use Tesla / use Tesla.Builder deprecation warning to include the caller module name, making deprecated macro usages easier to locate during compilation.

Changes:

  • Capture the invoking module via __CALLER__.module inside Tesla.Builder.__using__/1.
  • Include the caller module name in the emitted IO.warn/1 deprecation message.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/tesla/builder.ex
Comment thread lib/tesla/builder.ex
@yordis yordis merged commit b8fb158 into elixir-tesla:master Mar 6, 2026
10 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.

3 participants