dc0d
In short, when the specs are removed from lib/excoveralls_spec_lab/kata/user.ex , then the command mix coveralls.html works without a problem and generates the output html file cover/excoveralls.html .
But if there are any specs in lib/excoveralls_spec_lab/kata/user.ex , then the command mix coveralls.html will show this error:
** (exit) an exception was raised:
** (MatchError) no match of right hand side value: :error
cover.erl:1591: :cover.do_compile_beam2/6
cover.erl:1483: :cover.do_compile_beam/3
(stdlib) lists.erl:1239: :lists.map/2
cover.erl:2911: anonymous fn/2 in :cover.pmap_spawn/4
cover.erl:600: :cover.call/1
lib/excoveralls.ex:32: ExCoveralls.start/2
(mix) lib/mix/tasks/test.ex:351: Mix.Tasks.Test.run/1
(mix) lib/mix/task.ex:331: Mix.Task.run_task/3
lib/mix/tasks.ex:54: Mix.Tasks.Coveralls.do_run/2
(mix) lib/mix/task.ex:331: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:79: Mix.CLI.run_task/2
Elixir and Erlang versions:
erlang 22.0.1
elixir 1.8.2
Sample repository for reproducing the issue can be found here.
An issue is also opened for this.
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Hello,
I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter).
The diffic...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
I think I’ve found a small improvement I could contribute to <%= web_namespace %>.CoreComponents (installer/templates/phx_web/compo...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #elixirconf-us
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
LostKobrakai
As already noted in the issue you’re defining specs with a non existing type.
dc0d
Which type(s) does not exist? (I could not find the non-existing types in the issue)
Added a comment in the issue. Added
dialyxirand it provides a better error that states there areUnknown Types.LostKobrakai
There is no type
ExcoverallsSpecLab.Kata.User.t()like @Eiji said on the github issue. You need to define it. While it is common to usetas type name for the struct a module defines it is just a convention and not defined automatically.bdubaut
Hi, thanks for this discussion, as it seems I am not the only one with this issue. I’m getting the same type of error in an umbrella project. I have 4 apps in there, things are working fine, but one of the apps crashes.
here’s my circleci job:
Coveralls is properly configured (it worked fine before). The only thing that is different is that I’m using the CQRS/ES framework commanded from @slashdotdash . It fails both on CI and locally, pointing again at the issue with the
:covermodule (however I’m running with erlang 22, not 17 as it’s stated in the github issue linked earlier in the thread).The error I get is roughly the same as shown before:
In order to solve this, I had to remove all typespecs from my commanded app. This brings another question to me:
I can think of a few possiblities:
:covererlang module:covererlang moduleexcoverallspackageI would love to move this problem forward, but I feel a bit lost now. Does anyone have an idea?
EDIT
I was able to fix the issue by declaring types in the files that were supposed to:
putting this in the modules that required it fixed everything. I think it’s important to note that this was an issue as long as the missing types were used as arguments of the function being specified, things were fine if the return type of a function had not been specified at all in its module.
this is still a mystery to me, but at least I found a way to fix it.
bmitc
I am having similar issues. However, I am getting the warning:
In the first module that this error was reported for, I commented out all
@specattributes, and that made the error go away for that module. The next module that generated the error has no@specattributes. There is also no instance of<module_name>.t()referenced anywhere in the code. The module exists. It is aliased in a few places but no alias as instances. I’m not sure what to do to be able to run the test coverage tooling.I am not using ExCoveralls and am just running
mix test --cover. So I think this is an issue with whatever the interaction between Elixir, Mix, and:coveris.If there is an actual issue, the error certainly could be improved. For the project,
mix compileworks fine with only a single (expected) warning,mix testpasses, andmix credoshows no issues. I should note that the project is an umbrella project.al2o3cr
The function that returns that error is here:
https://github.com/erlang/otp/blob/738b597ff5a9489981a71102ae90d05276e1333f/lib/tools/src/cover.erl#L2775-L2782
My guess: something is producing compiled BEAM files in the wrong place or with the wrong compiler metadata (used by
find_source), but only sometimes. “Deleting all the@specs” makes the problem vanish because it forces that file to be recompiled.Edit to add: are you trying to calculate coverage across multiple apps in an umbrella project? The last time I tried tricking
:coverinto doing that, I got the whole BEAM to segfault…ananthakumaran
We ran into a similar situation and the root cause was CI cache related. I just wrote a blog post about it.
cpwood
I encountered the same problem in an umbrella project today, with no obvious change causing it.
I’ve found asking to export coverage fixed / worked-around the problem:
as indirectly suggested at mix test.coverage — Mix v1.11.2