Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace System.stacktrace with __STACKTRACE__ #119

Merged
merged 2 commits into from
Oct 15, 2020

Conversation

mbuhot
Copy link
Contributor

@mbuhot mbuhot commented Oct 14, 2020

Elixir 1.11 generates deprecation warnings from the use of System.stacktrace/0 in the trace macro.

Eg:

warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/services/search/elasticsearch.ex:195

Since the warning is reported as being in my application code (rather than the library), the build fails when compiling with the --warnings-as-errors flag.

This PR changes the implementation to use __STACKTRACE__ instead, which should be equivalent.
I've also updated the minimum elixir version to 1.7, since __STACKTRACE__ isn't supported in lower versions.

Copy link
Member

@GregMefford GregMefford left a comment

Choose a reason for hiding this comment

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

This looks great! Thanks for taking the time to improve this!

@GregMefford GregMefford added the hacktoberfest-accepted Participation credit for Hacktoberfest! label Oct 15, 2020
@GregMefford GregMefford merged commit 6328373 into spandex-project:master Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Participation credit for Hacktoberfest!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants