Empty output when running `mix test test/some_test.exs`

Somewhat of a vague question, but at the moment this is all I have.

Anyone know why a mix test test/some_test.exs would not run or yield an output? It didn’t error either.

Some background:
File exists. Ran perfectly before. Started “not running”.


my_app [my_branch] :> mix test test/some_test.exs
my_app [my_branch] :> mix test test/some_test.exs
my_app [my_branch] :>```

After a mix clean things started to work correctly again.

1 Like

Whenever anything weird is going on, always start with removing the _build and deps directories, and then re-fetch dependencies and recompile.


Thanks for your answer, I agree with you and that’s what solved the problem. But, do you know why @dimitarvp? That was my original question, not really interested in the solution here (crazy right?).

How can _build impact the test output? Maybe mix does some checking in there? Unsure.

Unsure myself but lately I’ve had a problem that seemed to imply that some of the deps do code generation and memorise certain paths in your filesystem. E.g. I used Erlang 21.2.4 in a project and when I updated to 22.0.7 later I’ve had compilation errors that included paths from Erlang 21.2.4 – it was weird and it led me to believe there’s some code generation / memorisation going on.

@dimitarvp There are some projects that use leex and yecc that a have checked in the .erl file to the package/repo. leex and yecc use Erlang records and the headers for these records are OTP release dependant and therefore should be generated at compile time. However if you change OTP releases, these deps won’t necessarily regenerate the .erl file and hence you can get the error you described. I’m sure there are other reasons why this can happen - but it does suggest its good hygiene to force recompile deps and code if you change OTP releases underneath.