Warning on Elixir v1.14
I'm doing a bit of preliminary testing with https://github.com/elixir-lang/elixir/releases/tag/v1.14.0-rc.1, and noticed the following warning, so I'm opening an issue to report it:
==> credo
Compiling 242 files (.ex)
warning: use Bitwise is deprecated. import Bitwise instead
lib/credo/execution/task/assign_exit_status_for_issues.ex:5: Credo.Execution.Task.AssignExitStatusForIssues
Generated credo app
https://github.com/rrrene/credo/blob/2e0c540fddd8021a8cca15f5d4b2cd99473b82f7/lib/credo/execution/task/assign_exit_status_for_issues.ex#L5
As with the issue you reported in Bunt, I am completely at a loss with this one.
Wrapping this in a version check, does result in a warning and does not work:
if Version.match?(System.version(), ">= 1.14.0-dev") do
import Bitwise
else
use Bitwise
end
Compiling 34 files (.ex)
warning: use Bitwise is deprecated. import Bitwise instead
lib/credo/execution/task/assign_exit_status_for_issues.ex:9: Credo.Execution.Task.AssignExitStatusForIssues
== Compilation error in file lib/credo/execution/task/assign_exit_status_for_issues.ex ==
** (CompileError) lib/credo/execution/task/assign_exit_status_for_issues.ex:27: undefined function |||/2 (expected Credo.Execution.Task.AssignExitStatusForIssues to define such a function or for it to be imported, but none are available)
If I remove the version check and just go with
import Bitwise
everything works.
Which leaves the question: What do we need to do to support both Elixir < 1.14 and >= 1.14-dev?
How about just using import Bitwise? That has always been supported.