Warnings from Ecto.create

I’m setting up a new development environment on a VPS and I’m getting a bunch of warnings when I run mix ecto.create. They don’t seem critical, but it does make me wonder if there are any updates to Phoenix and it’s components in the works?

warning: HashDict.fetch!/2 is deprecated, use maps and the Map module instead
lib/postgrex/types.ex:166

warning: the Behaviour module is deprecated. Instead of using this module, use the @callback and @macrocallback module attributes. See the documentation for Module for more information on these attributes
lib/postgrex/extension.ex:7: (module)
(elixir) src/elixir_compiler.erl:125: :elixir_compiler.dispatch_loaded/6
(elixir) src/elixir_module.erl:192: :elixir_module.eval_form/6
(elixir) src/elixir_module.erl:82: :elixir_module.do_compile/5
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6

warning: variable “macros” does not exist and is being expanded to “macros()”, please use parentheses to remove the ambiguity or change the variable name
lib/gettext/compiler.ex:41

I’m running a pretty new environment:
Erlang 18.3
Elixir 1.4
Phoenix 1.2.1

Thanks!

1 Like

I think you are on Elixir 1.3, not 1.4 (hasn’t been released just yet).

And this is the reason for the warnings - it deprecated bunch of previously accepted features. Not all libs caught up with that just yet.

1 Like

Thanks for the quick response! So it sounds like I don’t need to worry. I am running 1.4 though. Here is the output of running elixir -v:

root@shark centos7_build> elixir -v
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.4.0-dev (e5db795)

I followed the directions on Elixir-Lang for building from source (CentOS has a very old version of Elixir if I installed using yum). Should I downgrade/rightgrade to the 1.3 version?

1 Like

Building from source is fine, but you probably want to do a git checkout of the 1.3 tag. 1.4 is still in development and you’re gonna definitely get warnings because libraries tend not to make changes ahead of time for development builds.

1 Like

Ok thanks I’ll install the 1.3 version!

Edit: Worked great, got no warnings with 1.3.

If anyone else happens upon this thread via google, here is how to build the 1.3 from source (assuming you already have Erlang 18+ installed):

git clone https://github.com/elixir-lang/elixir.git --branch v1.3 --single-branch
cd elixir
make clean test
1 Like