smpallen99 / ex_admin

ExAdmin is an auto administration package for Elixir and the Phoenix Framework
MIT License
1.2k stars 276 forks source link

could not compile dependency :ex_admin, "mix compile" failed. You can recompile this dependency with "mix deps.compile ex_admin", update it with "mix deps.update ex_admin" or clean it with "mix deps.clean ex_admin" #435

Open isAlmogK opened 6 years ago

isAlmogK commented 6 years ago

First I added {:ex_admin, "~> 0.8.2"}, to my deps and ran mix do deps.get, deps.compile I got the following error

Failed to use "ex_queb" because
  ex_admin (version 0.8.2) requires ~> 0.2
  mix.lock specifies 1.0.0

So I then tried {:ex_admin, github: "smpallen99/ex_admin"},

and it ran but I got the following error could not compile dependency :ex_admin, "mix compile" failed. You can recompile this dependency with "mix deps.compile ex_admin", update it with "mix deps.update ex_admin" or clean it with "mix deps.clean ex_admin"

Here is the entire output


Compiling 0 files (.erl)
Compiling 20 files (.ex)
===> Compiling ranch
===> Failed to restore /Users/Almog/Almog-Studio/Almog Studio Products/Magnify/R&D/magnify/deps/ranch/.rebar3/erlcinfo file. Discarding it.

==> poolboy (compile)
warning: String.strip/1 is deprecated, use String.trim/1
  /Users/Almog/Almog-Studio/Almog Studio Products/Magnify/R&D/magnify/deps/poison/mix.exs:4

==> ssl_verify_fun (compile)
==> scrivener
Compiling 4 files (.ex)
Generated scrivener app
warning: variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name
  /Users/Almog/Almog-Studio/Almog Studio Products/Magnify/R&D/magnify/deps/csvlixir/mix.exs:7

warning: variable "description" does not exist and is being expanded to "description()", please use parentheses to remove the ambiguity or change the variable name
  /Users/Almog/Almog-Studio/Almog Studio Products/Magnify/R&D/magnify/deps/csvlixir/mix.exs:8

warning: variable "package" does not exist and is being expanded to "package()", please use parentheses to remove the ambiguity or change the variable name
  /Users/Almog/Almog-Studio/Almog Studio Products/Magnify/R&D/magnify/deps/csvlixir/mix.exs:9

==> csvlixir
Compiling 3 files (.ex)
Generated csvlixir app
==> comeonin
make: Nothing to be done for `all'.
===> Compiling certifi
===> Compiling hackney
===> Compiling cowlib
===> Failed to restore /Users/Almog/Almog-Studio/Almog Studio Products/Magnify/R&D/magnify/deps/cowlib/.rebar3/erlcinfo file. Discarding it.

src/cow_multipart.erl:392: Warning: call to crypto:rand_bytes/1 will fail, since it was removed in 20.0; use crypto:strong_rand_bytes/1

===> Compiling cowboy
===> Failed to restore /Users/Almog/Almog-Studio/Almog Studio Products/Magnify/R&D/magnify/deps/cowboy/.rebar3/erlcinfo file. Discarding it.

==> plug
Compiling 0 files (.erl)
Compiling 48 files (.ex)
==> ex_queb
Compiling 2 files (.ex)
warning: Enum.filter_map/3 is deprecated, use Enum.filter/2 + Enum.map/2 or for comprehensions
  lib/string_filters.ex:26

warning: Enum.filter_map/3 is deprecated, use Enum.filter/2 + Enum.map/2 or for comprehensions
  lib/ex_queb.ex:42

warning: Enum.filter_map/3 is deprecated, use Enum.filter/2 + Enum.map/2 or for comprehensions
  lib/ex_queb.ex:65

Generated ex_queb app
warning: variable "package" does not exist and is being expanded to "package()", please use parentheses to remove the ambiguity or change the variable name
  /Users/Almog/Almog-Studio/Almog Studio Products/Magnify/R&D/magnify/deps/xain/mix.exs:10

==> xain
Compiling 4 files (.ex)
warning: String.strip/1 is deprecated, use String.trim/1
  lib/xain/helpers.ex:22

warning: String.strip/1 is deprecated, use String.trim/1
  lib/xain/helpers.ex:26

warning: variable "quote_symbol" does not exist and is being expanded to "quote_symbol()", please use parentheses to remove the ambiguity or change the variable name
  lib/xain.ex:126

warning: variable "quote_symbol" does not exist and is being expanded to "quote_symbol()", please use parentheses to remove the ambiguity or change the variable name
  lib/xain.ex:126

Generated xain app
==> scrivener_ecto
Compiling 2 files (.ex)
Generated scrivener_ecto app
==> ex_admin
Compiling 71 files (.ex)
warning: Enum.filter_map/3 is deprecated, use Enum.filter/2 + Enum.map/2 or for comprehensions
  lib/ex_admin/ecto_form_mappers.ex:11

18:04:15.700 [error] /Users/Almog/Almog-Studio/Almog Studio Products/Magnify/R&D/magnify/_build/dev/lib/ex_admin/priv/gettext/pl_PL/LC_MESSAGES/default.po:6: translation is missing plural form 2 which is required by the locale "pl_PL"
warning: variable "repo" does not exist and is being expanded to "repo()", please use parentheses to remove the ambiguity or change the variable name
  lib/ex_admin/repo.ex:49

warning: variable "repo" does not exist and is being expanded to "repo()", please use parentheses to remove the ambiguity or change the variable name
  lib/ex_admin/repo.ex:53

18:04:15.864 [error] /Users/Almog/Almog-Studio/Almog Studio Products/Magnify/R&D/magnify/_build/dev/lib/ex_admin/priv/gettext/ru_RU/LC_MESSAGES/default.po:6: translation is missing plural form 2 which is required by the locale "ru_RU"
warning: Enum.filter_map/3 is deprecated, use Enum.filter/2 + Enum.map/2 or for comprehensions
  lib/ex_admin/param_associations.ex:44

18:04:15.963 [error] /Users/Almog/Almog-Studio/Almog Studio Products/Magnify/R&D/magnify/_build/dev/lib/ex_admin/priv/gettext/uk_UA/LC_MESSAGES/default.po:6: translation is missing plural form 2 which is required by the locale "uk_UA"

== Compilation error in file lib/ex_admin/paginate.ex ==
** (ArgumentError) *gettext macros expect translation keys (msgid and msgid_plural) and
domains to expand to strings at compile-time, but the given msgid
doesn't.

Dynamic translations should be avoided as they limit gettext's
ability to extract translations from your source code. If you are
sure you need dynamic lookup, you can use the functions in the Gettext
module:

    string = "hello world"
    Gettext.gettext(ExAdmin.Gettext, string)

    (gettext) lib/gettext/compiler.ex:231: Gettext.Compiler.expand_to_binary/4
    expanding macro: ExAdmin.Gettext.dgettext_noop/2
    lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
    expanding macro: ExAdmin.Gettext.dgettext/3
    lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
    expanding macro: ExAdmin.Gettext.gettext/1
    lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
    (elixir) expanding macro: Kernel.to_string/1
    lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
    expanding macro: Xain.text/1
    lib/ex_admin/paginate.ex:58: ExAdmin.Paginate.pagination_information/2
    expanding macro: Xain.markup/1
    lib/ex_admin/paginate.ex:57: ExAdmin.Paginate.pagination_information/2
    (elixir) lib/kernel/parallel_compiler.ex:198: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6
could not compile dependency :ex_admin, "mix compile" failed. You can recompile this dependency with "mix deps.compile ex_admin", update it with "mix deps.update ex_admin" or clean it with "mix deps.clean ex_admin"
isAlmogK commented 6 years ago

Any news about this is this project still being maintained?

smpallen99 commented 6 years ago

I started working updating to latest. However I’m on vacation so not much time. I’ll push an update soon to resolve the gettext errors

smpallen99 commented 6 years ago

I just updated a couple of my dependencies to remove compile warnings. Fixed the gettext compile issue and updated many other dependencies. Pushed this to master. It should compile much cleaner now. Remember, If you get a dependency mismatch error, you can put the dependency in you main project and and set the override option. i.e {:some_dependency, "~> 1.0.0", override: true}.

isAlmogK commented 6 years ago

@smpallen99 so I just added {:ex_admin, github: "smpallen99/ex_admin"}, this way it picks it up from master but I'm still getting the Compilation error in file lib/ex_admin/paginate.ex error

isAlmogK commented 6 years ago

I also tried running clean and doing it again no joy

smpallen99 commented 6 years ago

I’ll look at it tonight

smpallen99 commented 6 years ago

@AlmogRnD I just tried master and also reviewed the code in paginate.ex and everything works, and looks, ok. Based on the error you are getting in paginate.ex, I suspect that you are no picking up the newly compiled module. Try the following:

mix deps.clean ex_admin
mix deps.get

Let me know if that solves your issue.

isAlmogK commented 6 years ago

@smpallen99 I just did that and I'm still getting

(gettext) lib/gettext/compiler.ex:231: Gettext.Compiler.expand_to_binary/4

Are you sure {:ex_admin, github: "smpallen99/ex_admin"},

Is getting the new version

isAlmogK commented 6 years ago

Any news on this?