alfert / coverex

Coverage Reports for Elixir
Other
101 stars 26 forks source link

(ArgumentError) argument error - Elixir & Mix 1.3.2 (Erlang/OTP 19). #33

Closed Ivor closed 8 years ago

Ivor commented 8 years ago

When running my test suite with mix test --cover I get these errors. This worked fine before upgrading to Elixir 1.3.2 and Erlang 19.

    13:23:51.609 [error] Process #PID<0.291.0> raised an exception
** (ArgumentError) argument error
    (stdlib) :ets.insert(:cover_internal_clause_table, {MyApp.TokenError, [{MyApp.TokenError, :__info__, 1, 1, 1}, {MyApp.TokenError, :__info__, 1, 2, 1}, {MyApp.TokenError, :__info__, 1, 3, 1}, {MyApp.TokenError, :__struct__, 0, 1, 1}, {MyApp.TokenError, :__struct__, 1, 1, 2}, {MyApp.TokenError, :exception, 1, 1, 1}, {MyApp.TokenError, :exception, 1, 2, 2}, {MyApp.TokenError, :message, 1, 1, 3}]})
    cover.erl:1584: :cover.do_compile_beam2/5
    cover.erl:1478: :cover.do_compile_beam/3
    (stdlib) lists.erl:1239: :lists.map/2
    cover.erl:2732: anonymous fn/2 in :cover.pmap_spawn/4

13:23:51.609 [error] Process #PID<0.286.0> raised an exception
** (ArgumentError) argument error
    (stdlib) :ets.insert(:cover_internal_clause_table, {MyApp.PageController, [{MyApp.PageController, :__info__, 1, 1, 1}, {MyApp.PageController, :__info__, 1, 2, 1}, {MyApp.PageController, :__info__, 1, 3, 1}, {MyApp.PageController, :action, 2, 1, 2}, {MyApp.PageController, :"action (overridable 2)", 2, 1, 2}, {MyApp.PageController, :call, 2, 1, 1}, {MyApp.PageController, :index, 2, 1, 3}, {MyApp.PageController, :init, 1, 1, 1}, {MyApp.PageController, :phoenix_controller_pipeline, 2, 1, 4}]})
    cover.erl:1584: :cover.do_compile_beam2/5
    cover.erl:1478: :cover.do_compile_beam/3
    (stdlib) lists.erl:1239: :lists.map/2
    cover.erl:2732: anonymous fn/2 in :cover.pmap_spawn/4

13:23:51.611 [error] Process #PID<0.288.0> raised an exception
** (ArgumentError) argument error
    (stdlib) :ets.insert(:cover_internal_clause_table, {MyApp.RegistrationView, [{MyApp.RegistrationView, :__info__, 1, 1, 1}, {MyApp.RegistrationView, :__info__, 1, 2, 1}, {MyApp.RegistrationView, :__info__, 1, 3, 1}, {MyApp.RegistrationView, :__phoenix_recompile__?, 0, 1, 1}, {MyApp.RegistrationView, :__resource__, 0, 1, 1}, {MyApp.RegistrationView, :__templates__, 0, 1, 1}, {MyApp.RegistrationView, :render, 1, 1, 1}, {MyApp.RegistrationView, :render, 2, 1, 1}, {MyApp.RegistrationView, :render, 2, 2, 1}, {MyApp.RegistrationView, :render, 2, 3, 1}, {MyApp.RegistrationView, :render, 2, 4, 1}, {MyApp.RegistrationView, :render_template, 2, 1, 1}, {MyApp.RegistrationView, :render_template, 2, 2, 1}, {MyApp.RegistrationView, :render_template, 2, 3, 1}, {MyApp.RegistrationView, :render_template, 2, 4, 1}, {MyApp.RegistrationView, :render_template, 2, 5, 1}, {MyApp.RegistrationView, :template_not_found, 2, 1, 1}]})
    cover.erl:1584: :cover.do_compile_beam2/5
    cover.erl:1478: :cover.do_compile_beam/3
    (stdlib) lists.erl:1239: :lists.map/2
    cover.erl:2732: anonymous fn/2 in :cover.pmap_spawn/4

Something I suspect is noteworthy, is that I get the same errors with excoveralls as I get with this project so I suspect it might be related to the underlying erlang cover library?

Ivor commented 8 years ago

I have confirmed that this works for Erlang / OTP 18.3 so the problem was definitely introduced when Erlang went from 18.3 to 19.0.

alfert commented 8 years ago

There is some issue deep inside cover from Erlang 19. In the changelogs I did not find any comments regarding cover, so it is really annoying.

Ivor commented 8 years ago

Thanks for looking into it. Is everyone else just using OTP 18.3 for the time being? I am wondering why it doesn't seem to be a problem for most people.

alfert commented 8 years ago

Please upgrade Elixir to 1.3.4, that should solve the issue.

Ivor commented 8 years ago

Hi @alfert I tried on Elixir 1.3.4 with OTP 19.0 and 19.1 with the same result. Elixir 1.3.4 and OTP 18.3 still works.

schnittchen commented 7 years ago

I'm seeing the same error with CoberturaCover instead of coverex, on Elixir 1.4.2.