Search code examples
elixirelixir-mixecto

Mix compiliation fails when compiling Ecto


In Elixir:
When trying to compile the dependencies for Ecto, I run into the following error with Mix and poolboy:

>mix compile

** (Mix) The application poolboy specified a non Semantic Version `cat VERSION`. Mix can only match the requirement ~> 1.2.1 against Semantic Versions, to match against any version, please use a regex as requirement

I'm on Windows 8.1

Here are my mix deps:
Note: I have to use "~> 0.6.0" for postgrex or else it complain of dependency resolution. (In Ecto docs, it just says to use ">= 0.0.0")

defp deps do
[
  {:postgrex, "~> 0.6.0"},
  {:ecto, "~> 0.2.5"}
]
end

From the compile error message, it seems that either mix is not handling something properly or poolboy isn't and may not be on the Ecto side?

Anyways, anyone know how to fix this or have a workaround? Thanks.


Solution

  • This is a poolboy bug. Rebar (Erlang build tool) allows users to inject custom code in their application files and poolboy is using this feature to read the VERSION from the filesystem using specific OS commands. It works on Linux but it is going to fail on Windows. I have opened an issue on Poolboy issues tracker.