Skip to content
New issue

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

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

Already on GitHub? # to your account

Compilation error: "attribute 'dialyzer' after function definitions" #24

Closed
henrik opened this issue Sep 17, 2015 · 10 comments
Closed

Compilation error: "attribute 'dialyzer' after function definitions" #24

henrik opened this issue Sep 17, 2015 · 10 comments

Comments

@henrik
Copy link

henrik commented Sep 17, 2015

I get this trying to mix deps.compile floki on my OS X machine:

/usr/local/Cellar/erlang/18.0.2/lib/erlang/lib/parsetools-2.1/include/leexinc.hrl:47: attribute 'dialyzer' after function definitions
/usr/local/Cellar/erlang/18.0.2/lib/erlang/lib/parsetools-2.1/include/leexinc.hrl:118: attribute 'dialyzer' after function definitions
/usr/local/Cellar/erlang/18.0.2/lib/erlang/lib/parsetools-2.1/include/leexinc.hrl:194: attribute 'dialyzer' after function definitions
/usr/local/Cellar/erlang/18.0.2/lib/erlang/lib/parsetools-2.1/include/leexinc.hrl:247: attribute 'dialyzer' after function definitions
==> floki
could not compile dependency floki, mix compile failed. You can recompile this dependency with `mix deps.compile floki` or update it with `mix deps.update floki`
@philss
Copy link
Owner

philss commented Sep 17, 2015

@henrik and @licyeus can you provide your Elixir and Erlang versions?

To check Erlang version with brew, use: brew info erlang | grep "*"
To check Elixir version, run: elixir -v.

@sllvn
Copy link

sllvn commented Sep 17, 2015

➜  brew info erlang | grep "*"
/usr/local/Cellar/erlang/17.5 (7398 files, 282M) *
➜  elixir -v
Elixir 1.0.5

Interesting that my stacktrace references 18.0.2, but brew states I'm running 17.5. I'm upgrading erlang with homebrew and will let you know after lunch if it works.

@henrik
Copy link
Author

henrik commented Sep 17, 2015

$ brew info erlang | grep "*"
/usr/local/Cellar/erlang/17.5 (7398 files, 283M) *
$ elixir -v
Elixir 1.0.4

I'll try to hold off on upgrading things so I can evaluate any backwards-compatibility fix (if that's the issue).

@philss
Copy link
Owner

philss commented Sep 17, 2015

@licyeus @henrik thank you! I will take a look later today. This seems to be something related to the Erlang version , but I'm not sure. I tested Floki against Erlang 18.0.2 and 18.0.3, and it works fine.

@henrik Ok.

@sllvn
Copy link

sllvn commented Sep 17, 2015

Upgrading to erlang 18.0.3 (via brew upgrade erlang) fixed the issue. Floki now compiles successfully. @philss, thanks for the heads up on how to check system erlang version.

@henrik
Copy link
Author

henrik commented Sep 18, 2015

👍 If you bump the version I'm happy to try the latest.

Sent from my iPhone

On 18 Sep 2015, at 06:35, Philip Sampaio notifications@github.com wrote:

Closed #24 via #26.


Reply to this email directly or view it on GitHub.

@philss
Copy link
Owner

philss commented Sep 18, 2015

@henrik great! You can take a look now in the new version 0.4.1 (it's already published).

My bad, guys. The problem was that I added a file that shouldn't be added to the Hex package. You can't see the file because is not under versioning, but is a file that is generated by the "leex" compiler.
This explain why you were seeing "/usr/local/Cellar/erlang/18.0.2/".

Let me know if you have any issues.

Thanks again for reporting!

cc @licyeus

@philss
Copy link
Owner

philss commented Sep 18, 2015

@henrik can you try this new version (0.4.1)?

@philss philss reopened this Sep 18, 2015
@henrik
Copy link
Author

henrik commented Sep 19, 2015

Works! 👍 Thanks so much, Philip!

Sent from my iPhone

On 18 Sep 2015, at 20:28, Philip Sampaio notifications@github.com wrote:

@henrik can you try this new version (0.4.1)?


Reply to this email directly or view it on GitHub.

@philss
Copy link
Owner

philss commented Sep 19, 2015

@henrik Ok, thanks for testing it!

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

No branches or pull requests

3 participants