Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failure #1

Closed
paulcsmith opened this issue Nov 16, 2015 · 9 comments
Closed

Compilation failure #1

paulcsmith opened this issue Nov 16, 2015 · 9 comments

Comments

@paulcsmith
Copy link

I may be using this incorrectly, but I tried installing this on two projects and it fails during compilation on both projects. Here's the error:

== Compilation error on file lib/credo/code/module.ex ==
** (ArgumentError) argument error
    :erlang.++(nil, [:when])
    lib/credo/code/module.ex:41: (module)
    (stdlib) erl_eval.erl:669: :erl_eval.do_apply/6

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

To reproduce I add the dependency, run mix deps.get and then mix compile. Thanks for working on this. I'm super excited to give it a try! :D

@bbense
Copy link

bbense commented Nov 16, 2015

Same thing happening on my machine.

mix deps.compile
==> credo
Compiled lib/credo/check/code_pattern.ex
Compiled lib/credo.ex
Compiled lib/credo/check.ex
Compiled lib/credo/check/params.ex
Compiled lib/credo/check/property_value.ex
Compiled lib/credo/check/refactor/helper.ex
Compiled lib/credo/cli/command/categories.ex
Compiled lib/credo/cli/command/version.ex
Compiled lib/credo/cli/command/help.ex
Compiled lib/credo/cli/filename.ex
Compiled lib/credo/cli/output/categories.ex
Compiled lib/credo/cli/output.ex
Compiled lib/credo/cli/output/ui.ex
Compiled lib/credo/code/name.ex

== Compilation error on file lib/credo/code/module.ex ==
** (ArgumentError) argument error
:erlang.++(nil, [:when])
lib/credo/code/module.ex:41: (module)
(stdlib) erl_eval.erl:669: :erl_eval.do_apply/6

could not compile dependency :credo, "mix compile" failed. You can recompile this dependency with "mix deps.compile credo", update it with "mix deps.update credo" or clean it with "mix deps.clean credo"
12:10:21 Mini:erlman > iex --version
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Elixir 1.1.1

@bbense
Copy link

bbense commented Nov 16, 2015

Seems like the problem is in this line in module.ex

 @def_ops Application.get_env(:credo, :def_ops)

Maybe if you put in a suitable default value.

@rrrene
Copy link
Owner

rrrene commented Nov 16, 2015

Seems like maybe I misunderstood the configuration of apps.

I thought I could define the default values for Credo in Credo's config/config.exs. Isn't that the case?

@paulcsmith
Copy link
Author

I don't believe that's the case. config/config.exs applies to Credo itself, but not the app that is using it. So you could probably add some notes to the README about what the config option should be, or set the default in the code itself instead of in config/config.exs.

@paulcsmith
Copy link
Author

I could be wrong though. My app/OTP skills are not the best :)

@rrrene
Copy link
Owner

rrrene commented Nov 16, 2015

Mmmh ... now I feel pretty stupid. Will fix right away!

@rrrene
Copy link
Owner

rrrene commented Nov 16, 2015

@paulcsmith @bbense pushed v0.1.3 can you please check if it compiles?

@paulcsmith
Copy link
Author

@rrrene Works for me now! Thank you! This is a very beautiful tool so far. Can't wait to dive in more :D

@bbense
Copy link

bbense commented Nov 16, 2015

0.1.3 compiles and works fine for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants