Thanks, I know :) The problem with that is wanting to run a benchmark with 
all examples in it, so this would always force compilation for all 3 files 
which doesn't help with that particular benchmarking case.
On Thursday, February 23, 2023 at 1:26:59 PM UTC+1 woj...@wojtekmach.pl 
wrote:

> You can also force recompilation by defining this function:
>
>     def __mix_recompile__?, do: true
>
> Wiadomość napisana przez José Valim <jose....@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 <pra...@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
>>
>> [1] https://xkcd.com/1172/
>> [2] https://hexdocs.pm/elixir/1.13/changelog.html#semantic-recompilation
>> [3] https://github.com/sharkdp/hyperfine
>>
>> -- 
>> 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-co...@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
>>  
>> <https://groups.google.com/d/msgid/elixir-lang-core/97956f7b-f789-4b9f-94e3-c3b1bda462d0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> -- 
> 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-co...@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
>  
> <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4KRdqMGcOoPs-F5XHSGP%2Bz2_BKtFe%3Dj07qhrJbpsCmxoQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
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/801a29b1-7521-4096-8d40-07fd3b3beaaen%40googlegroups.com.

Reply via email to