Ah, that’s due to the Erlang version. You are right to upgrade it if you’re following with other books.
I’m unsure of the problem you’re facing because changed the use to import in channel_case.ex but no difference
is not correct. When you change from use
to import
there, that warning will disappear.
I’m unable to provide updated code for the book because that has to go through a process with the publisher. I’m willing to evaluate my options for providing a code-update, but I need to get their thoughts here.
What about this: you upload your warning code (not the one with :pg2 failing) to Github and I’ll update it to work with latest Erlang/Elixir without warnings. I cannot do every chapter’s code, but I can do it for the current code you’re stuck on. It is likely something you can then apply to other chapters.