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
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










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