You can also force recompilation by defining this function:

    def __mix_recompile__?, do: true

Wiadomość napisana przez José Valim <jose.va...@dashbit.co> w dniu 23.02.2023, o godz. 11:20:


Could you potentially use `mix run lib/my_file.ex` for those cases?

On Thu, Feb 23, 2023 at 10:27 AM Tobias Pfeiffer <prag...@gmail.com> wrote:
Hi everyone and as always, thanks for your amazing work!

Jokes have been lobbied at me in the spirit of the "breaks my worlfow" XKCD [1]  - but, please here me out!

Since the (amazing!) 1.13 [2] elixir semantic recompilation changes I can't easily force recompilation on single files.

The best I know how, is adding empty comments to the files. That is fine for single tries. However, for those who know me, I like benchmarking. Particularly, I'd like to use something like hyperfine [3] to benchmark the compilation. I could write scripts to add/remove comments in between but it seems clumsy.

I might be missing a variant to get this done here.If so, I apologize for not first going to elixirforum.

As for _why_ do I want to do this: I have 3 implementations of the same module. I'd really like to compare the impact of the implementation on compilation time (one generates a bunch of functions to pattern match, the other one just uses a map, there is one variant which also does a file read) to provide general guidance on the impact.

I had hoped that I could do `mix compile --force lib/my_file.ex`, but it always compiles everything. Enabling this interface would be my proposal to remedy this, but y'all might have better ideas or tell me it's not worth it :)

Cheers + thanks,
Tobi

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/97956f7b-f789-4b9f-94e3-c3b1bda462d0n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4KRdqMGcOoPs-F5XHSGP%2Bz2_BKtFe%3Dj07qhrJbpsCmxoQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/DFFC1FE0-87D2-4286-AF47-647825BAD460%40wojtekmach.pl.

Reply via email to