Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mix test compiles even when nothing has changed #12801

Closed
joaopsramos opened this issue Jul 17, 2023 · 2 comments
Closed

Mix test compiles even when nothing has changed #12801

joaopsramos opened this issue Jul 17, 2023 · 2 comments

Comments

@joaopsramos
Copy link
Contributor

joaopsramos commented Jul 17, 2023

Elixir and Erlang/OTP versions

Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:32:12] [ds:32:12:10] [async-threads:1] [jit:ns]

Elixir 1.15.3 (compiled with Erlang/OTP 26)

Operating system

Arch

Current behavior

In an umbrella project, after removing the _build directory, when I initially run mix test apps/some_app/some_test.exs, it performs the first compilation as expected. However, upon subsequent runs, it triggers another compilation, although smaller. This behavior persists for several runs until it eventually stops compiling, which is the expected behavior since nothing has changed. In my case, this occurs around the fourth run, the compilation output also changes on every run.

I couldn't create a project that exactly reproduces this recompilation issue, however, after some investigation, I suspect this bug was introduced in f3c4c8c. Reverting this commit fixes the problem, it appears that the new removed variable is not empty when it should be (I think?).

To reproduce the behavior above, create an umbrella project with two apps. When running a test with IO.inspect on the removed variable, it produces the following output:

bar_foo

Expected behavior

Mix test should not compile again if no file has changed.

@josevalim
Copy link
Member

Can you please give the v1.15 branch a try?

@josevalim josevalim reopened this Jul 17, 2023
@joaopsramos
Copy link
Contributor Author

It's working fine now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants