yrashk / relex

Erlang/Elixir Release Assembler
59 stars 12 forks source link

Relex fails to build #13

Open ghost opened 10 years ago

ghost commented 10 years ago

In the build process of expm:

* Compiling relex
Compiled lib/relex.ex
== Compilation error on file lib/files.ex ==
could not compile dependency relex, mix compile failed. You can recompile this dependency with `mix deps.compile relex` or update it with `mix deps.update relex`
** (CompileError) deps/relex/lib/files.ex:9: unhandled &1 outside of a capture
    src/elixir_translator.erl:589: :elixir_translator.translate_arg/2
    lists.erl:1339: :lists.mapfoldl/3
    src/elixir_translator.erl:596: :elixir_translator.translate_args/2
    src/elixir_translator.erl:434: :elixir_translator.translate_each/2
    src/elixir_translator.erl:589: :elixir_translator.translate_arg/2
    lists.erl:1339: :lists.mapfoldl/3
    lists.erl:1340: :lists.mapfoldl/3
webcoyote commented 10 years ago

Perhaps the project you're trying to compile locks the version of relex which is being used. I experienced the same thing trying to compile expm. Try:

mix deps.unlock relex
mix deps.update relex
mix deps.compile relex    # <<< should work now
randysecrist commented 10 years ago

Hello,

I'm seeing a different relex build issue when running mix on a fresh clone:

$ mix

== Compilation error on file lib/app.ex ==
** (ArgumentError) cannot invoke def/2 outside module
    (elixir) lib/kernel.ex:3571: Kernel.assert_module_scope/3
    (elixir) lib/kernel.ex:2835: Kernel.define/4
    (elixir) expanding macro: Kernel.def/2

I am curious if these defs now need to be funs for some reason? Reference: http://joearms.github.io/2013/05/31/a-week-with-elixir.html under the section Funs and defs are not the same.

Otherwise, not sure what changed. Compile works perfectly fine under elixir 0.12.4.

My environment:

cconstantin commented 10 years ago

@randysecrist did you manage to build relex? I am experiencing the same issue.

randysecrist commented 10 years ago

@cconstantin not yet, gave up for a bit. Most of the breaks are because of changes in elixir in the 0.14 line.

I've fixed locally a number of problems, and am now learning about how elixir exceptions changed so that I can learn how the 'lib/app.ex' file needs to be updated.