Dependency problems w/ ecto, decimal missing, etc.

674 views
Skip to first unread message

Doug Goldie

unread,
Aug 3, 2014, 3:37:32 PM8/3/14
to elixir-l...@googlegroups.com
What am I doing wrong?
-thanks

I can't get my deps working after
I tried to play Elixir 15.0.
After switching Elixir back to to 14.3... 
I realize some of my deps were pointing to master branches, like ecto.
So, I switched to Ecto 0.2.2, but getting a strange error.

after doing deps.clean --all, deps.get, deps.compile, I get the errors below.
and Decimal is missing. 

If I do deps.unlock on decimal, I can do a deps get and retrieve decimal, 
but it is still not in _build directory


$ mix deps
.compile decimal
** (Mix) Unknown dependency decimal for environment dev



== Compilation error on file lib/ecto/query/util.ex ==
** (CompileError) lib/ecto/query/util.ex:60: Decimal.__struct__/0 is undefined, cannot expand struct Decimal
   
(elixir) src/elixir_map.erl:44: :elixir_map.translate_struct/4
   
(stdlib) lists.erl:1352: :lists.mapfoldl/3
   
(elixir) src/elixir_clauses.erl:26: :elixir_clauses.match/3
   
(elixir) src/elixir_clauses.erl:35: :elixir_clauses.clause/7
   
(elixir) src/elixir_def.erl:195: :elixir_def.translate_clause/7 \
   
(elixir) src/elixir_def.erl:184: :elixir_def.translate_definition/8
   
(elixir) src/elixir_def.erl:95: :elixir_def.store_definition/9
   
(elixir) src/elixir.erl:170: :elixir.erl_eval/3

== Compilation error on file lib/ecto/model/schema.ex ==
** (CompileError) lib/ecto/model/schema.ex:128: module Ecto.Query.Util is not loaded and could not be found
   
(elixir) src/elixir_exp.erl:102: :elixir_exp.expand/2
   
(stdlib) lists.erl:1352: :lists.mapfoldl/3
   
(stdlib) lists.erl:1353: :lists.mapfoldl/3
   
(elixir) src/elixir_exp.erl:49: :elixir_exp.expand/2
   
(elixir) src/elixir.erl:201: :elixir.quoted_to_erl/3
   
(elixir) src/elixir.erl:170: :elixir.erl_eval/3

could
not compile dependency ecto, mix compile failed. You can recompile this dependency with `mix deps.compile ecto` or update it with `mix deps.update ecto`

2.1.2 apollo:~/code/work/fbrain/thor (master)!!!


my project ..

# mix.exs
...
 defp deps
do
   
[
     
{:phoenix, "0.3.1"},
     
{:cowboy, "~> 0.10.0", github: "extend/cowboy", optional: true},
     
{:oauthex, github: "dgoldie/oauthex"},
     
{:httpoison, github: "edgurgel/httpoison"},
     
{:sweet_xml, github: "gniquil/sweet_xml"},
     
{:apex, github: "BjRo/apex"},
     
{:postgrex, ">= 0.0.0"},
     
# {:ecto, github: "elixir-lang/ecto"},
     
{:ecto, "~> 0.2.2"},
     
{:timex, "~> 0.10.1"}
   
]





Eric Meadows-Jönsson

unread,
Aug 3, 2014, 3:58:42 PM8/3/14
to elixir-l...@googlegroups.com
If you downgrade Elixir versions you need to reinstall Hex to an older version, run: `mix local.hex`.






--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Eric Meadows-Jönsson

Doug Goldie

unread,
Aug 3, 2014, 5:08:00 PM8/3/14
to elixir-l...@googlegroups.com
Cool! ...I didn't think of that....
]That solved this problem, but after a clean all and get...
now I have the errors below....

How is it that we pulling cowboy 1.0.0 when I'm specifying 10.0.0 in mix.exs?
There's the same question for the other erlang libraries.

thanks


$ mix compile

Unchecked dependencies for environment dev:

* oauth (git://github.com/tim/erlang-oauth.git)
  the dependency does
not match the requirement "1.4.0", got "1.5.0"

* cowboy (git://github.com/extend/cowboy.git)
  the dependency does
not match the requirement "~> 0.10.0", got "1.0.0"

* exlager (git://github.com/khia/exlager.git)
  the dependency does
not match the requirement "~> 0.2.0", got "0.14.0"

** (Mix) Can't continue due to errors on dependencies

2.1.2 apollo:~/code/work/fbrain/thor (master)!!!

José Valim

unread,
Aug 3, 2014, 5:11:32 PM8/3/14
to elixir-l...@googlegroups.com
We don't do dependency resolution over git repositories because simply it isn't possible. So we will always Use master.

We have just published cowboy to hex though, so you can simply have: {:cowboy, "~> 1.0"} from now on.

--


José Valim
Skype: jv.ptec
Founder and Lead Developer

Reply all
Reply to author
Forward
0 new messages