cjk

cjk

Mix test --cover crashes with a FunctionClauseError

Hi,

in a project I am maintaining I am working on increasing test coverage. But when I wanted to check the current state of coverage with mix test --cover, I got this error:

Cover compiling modules ...
** (exit) an exception was raised:
    ** (FunctionClauseError) no function clause matching in :cover."-patch_code1/2-lc$^0/1-1-"/1
        cover.erl:2181: :cover."-patch_code1/2-lc$^0/1-1-"(2)
        cover.erl:2181: :cover.patch_code1/2
        cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
        cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
        cover.erl:2191: :cover.patch_code_tuple/5
        cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
        cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
        cover.erl:1649: :cover.transform/4
    cover.erl:602: :cover.call/1
    (mix 1.11.3) lib/mix/tasks/test.coverage.ex:142: anonymous fn/2 in Mix.Tasks.Test.Coverage.cover_compile/1
    (elixir 1.11.3) lib/enum.ex:2193: Enum."-reduce/3-lists^foldl/2-0-"/3
    (mix 1.11.3) lib/mix/tasks/test.coverage.ex:141: Mix.Tasks.Test.Coverage.cover_compile/1
    (mix 1.11.3) lib/mix/tasks/test.coverage.ex:122: Mix.Tasks.Test.Coverage.start/2
    (mix 1.11.3) lib/mix/tasks/test.ex:336: Mix.Tasks.Test.do_run/3
    (mix 1.11.3) lib/mix/task.ex:394: Mix.Task.run_task/3
    (mix 1.11.3) lib/mix/task.ex:439: Mix.Task.run_alias/5

08:53:12.591 [error] Process #PID<0.3787.0> raised an exception
** (FunctionClauseError) no function clause matching in :cover."-patch_code1/2-lc$^0/1-1-"/1
    cover.erl:2181: :cover."-patch_code1/2-lc$^0/1-1-"(2)
    cover.erl:2181: :cover.patch_code1/2
    cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
    cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
    cover.erl:2191: :cover.patch_code_tuple/5
    cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
    cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
    cover.erl:1649: :cover.transform/4

Am I doing something wrong?

Best regards,
CK

Marked As Solved

josevalim

josevalim

Creator of Elixir

That’s definitely a bug. Make sure you are on latest Elixir and, if the bug persists, please open up a report!

Where Next?

Popular in Questions Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
logicmason
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
Phillipp
Hey, I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the ...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement