Mix should use Checksums for recompilation

36 views
Skip to first unread message

l...@expert360.com

unread,
Dec 20, 2017, 1:49:28 AM12/20/17
to elixir-lang-core
The default mix compile to determine if something is stale is to use the last-modified time on each file.


A checksum should be used instead to determine if a file has changed rather than the last modified time as I have been experiencing issues which cause everything to be recompiled when the file hasn't changed.

José Valim

unread,
Dec 20, 2017, 2:10:26 AM12/20/17
to elixir-l...@googlegroups.com
Can you please provide more information on this scenario? When does it happen? Why does it trigger? How to reproduce it?

Please try to describe the problem as detailed as possible without focusing on a possible solution.

Using checksums makes the cost of noop much higher, since we need to read files and compute MD5s, and that would be harmful to development.
--


José Valim
Founder and 
Director of R&D

l...@expert360.com

unread,
Dec 27, 2017, 6:42:07 PM12/27/17
to elixir-lang-core
I can't. I'm hoping there is a way to add debug logs for the mix compilation task? Or someway for me to try and get to the bottom of why it thinks it needs to recompile?

Xavier Noria

unread,
Dec 27, 2017, 6:53:40 PM12/27/17
to elixir-l...@googlegroups.com
On Thu, 28 Dec 2017 at 00:42, <l...@expert360.com> wrote:
I can't. I'm hoping there is a way to add debug logs for the mix compilation task? Or someway for me to try and get to the bottom of why it thinks it needs to recompile?

Let me just say in case it helps that running a patched Mix or Elixir compiler is very easy: Just checkout the project, add traces, make compile, and use the executables under bin. Those executables use relative paths so they’ll pick your modifications.

--
Sent from Gmail Mobile

José Valim

unread,
Dec 27, 2017, 8:37:40 PM12/27/17
to elixir-l...@googlegroups.com
There is MIX_DEBUG=1 as well as "mix compile --verbose" which will spit more info but it won't say the reason why recompilation was triggered.



José Valim
Founder and 
Director of R&D

Want to get insights, recommendations and answers from top consultants for free? Head to Discussions to ask questions and find answers.

———————————————————————————————————————————————
This email is intended for the sole use of the intended recipient(s) and may contain information that is confidential and/or privileged.  Any review or distribution by any other person is prohibited.  If you are not an intended recipient, please immediately contact the sender and delete all copies of this email message

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/4d211ea0-8108-4ef1-8b09-4a28b8fdcd73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages