Fix deprecation warning for use Bitwise
in Elixir 1.14+
#5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there 👋 Nice library!
I noticed a couple of deprecation warnings when running tests in a recent version:
I looked through the Elixir changelog and discovered that
use Bitwise
is hard deprecated since 1.14.This PR makes the recommended changes and imports the module instead.
On another topic — I wanted to check the backwards compatibility of this change. I started by running the tests against version
1.9
, which is the minimum stated compatible version inmix.exs
but I encountered a compilation error:Which refers to the following line:
I decided to run tests against the
master
branch in a number ofhexpm/elixir
containers and the earliest tag that did not raise this compilation error is1.11.0-erlang-21.0.1-debian-bullseye-20210902
.I can confirm the
Bitwise
changes in this PR also result in a successful test run:So in addition to that change, I think it might be necessary to bump the minimum stated compatible version to
1.11
. In any case, this is the minimum supported version of Elixir (security patches only).