--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/CAOf5uwmBQeZgfEvkOF8ewCP_tnHWFE30-H2UdS-j7K3mTFJzAQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/CAOf5uw%3DmcaqF5sNpd3B4jV4-gYU2w7X6y7rj%3DxBgK0KsrO37%2BQ%40mail.gmail.com.
Hi
On Thu, Jun 1, 2023 at 7:47 PM Kousik Kumar <kous...@gmail.com> wrote:
>
> There was a patch to Ninja to invalidate based on file hash instead of relying only on file modification times - https://github.com/ninja-build/ninja/pull/929. The patch is intended for exactly the kind of use case you are describing.
>
I will take a look at it
thank you
Michael
> Kousik
>
> On Thu, Jun 1, 2023 at 9:23 AM Michael Nazzareno Trimarchi <mic...@amarulasolutions.com> wrote:
>>
>> Hi all
>>
>> I have done a project but I notice that re-build is triggered even if
>> the file is not changed but just edit, restore to original and save.
>> It's that something that ninja should take in account in dep
>> calculation?
>>
>> Michael
>>
>> --
>> You received this message because you are subscribed to the Google Groups "ninja-build" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/CAOf5uwmBQeZgfEvkOF8ewCP_tnHWFE30-H2UdS-j7K3mTFJzAQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/CAOf5uwndmRAAjNc4NkfEZpG8_Qq%2BWzN5cisWbLnJ%2BLceTKXZmQ%40mail.gmail.com.
It probably should be unconditional, since the point is to detect content changes (or not) not reflected in the timestamp. A conditional approach would be equivalent to wrapping the compiler driver, since you could rely on the build system to handle gating on timestamp.
--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/CACwGi-7os1smaLZK9rjuTmoo83Ehe-d--hprbLD3xVjV9ahG9w%40mail.gmail.com.
{ name : "Daniel Moody",
title : "Sen Server Development Platform Eng",
phone : "321-506-6255",
location : "Cedar Rapids, IA",
twitter : "@MongoDB",
facebook : "MongoDB" }
Hi
On Thu, Jun 1, 2023 at 7:47 PM Kousik Kumar <kous...@gmail.com> wrote:
>
> There was a patch to Ninja to invalidate based on file hash instead of relying only on file modification times - https://github.com/ninja-build/ninja/pull/929. The patch is intended for exactly the kind of use case you are describing.
>
I will take a look at it
thank you
Michael
> Kousik
>
> On Thu, Jun 1, 2023 at 9:23 AM Michael Nazzareno Trimarchi <mic...@amarulasolutions.com> wrote:
>>
>> Hi all
>>
>> I have done a project but I notice that re-build is triggered even if
>> the file is not changed but just edit, restore to original and save.
>> It's that something that ninja should take in account in dep
>> calculation?
>>
>> Michael
>>
>> --
>> You received this message because you are subscribed to the Google Groups "ninja-build" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/CAOf5uwmBQeZgfEvkOF8ewCP_tnHWFE30-H2UdS-j7K3mTFJzAQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/CAOf5uwndmRAAjNc4NkfEZpG8_Qq%2BWzN5cisWbLnJ%2BLceTKXZmQ%40mail.gmail.com.
Hi
On Thu, Jun 1, 2023 at 4:49 PM David Turner <di...@google.com> wrote:
>
>
>
> On Thu, Jun 1, 2023 at 4:32 PM Michael Nazzareno Trimarchi <mic...@amarulasolutions.com> wrote:
>>
>> Hi Lee
>>
>> and what sense can you see to rebuild it?
>>
> Ninja uses filesystem timestamps to decide when to re-run commands, as this is much simpler and faster than trying to compare the content of each input file.
> When you save the file, even if it is unmodified, you refresh the timestamp to a newer (i.e. greater) value. Ninja will then run any command that uses that file as input on the next invocation (and anything that depends on its outputs as well).
>
> So the behavior you are seeing is working as intended.
>
> There are many reasons to consider that relying on timestamps is a bad idea, but all the alternatives improve correctness at the cost of great complexity. And Ninja is, by design, a simple tool.
>
So it means that it's much faster to compile a c ++ file then
calculate an md5 on the file. I mean do you have an article or paper
that shows that it's a good compromise?
Hi Lee
and what sense can you see to rebuild it?
Michael
To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/CAOf5uwk3Kc3iHwnqp5r1PmR8ioNEkjZ4NU6KOj5V34NFAiiuaA%40mail.gmail.com.
Hi
On Thu, Jun 1, 2023 at 4:49 PM David Turner <di...@google.com> wrote:
>
>
>
> On Thu, Jun 1, 2023 at 4:32 PM Michael Nazzareno Trimarchi <mic...@amarulasolutions.com> wrote:
>>
>> Hi Lee
>>
>> and what sense can you see to rebuild it?
>>
> Ninja uses filesystem timestamps to decide when to re-run commands, as this is much simpler and faster than trying to compare the content of each input file.
> When you save the file, even if it is unmodified, you refresh the timestamp to a newer (i.e. greater) value. Ninja will then run any command that uses that file as input on the next invocation (and anything that depends on its outputs as well).
>
> So the behavior you are seeing is working as intended.
>
> There are many reasons to consider that relying on timestamps is a bad idea, but all the alternatives improve correctness at the cost of great complexity. And Ninja is, by design, a simple tool.
>
So it means that it's much faster to compile a c ++ file then
calculate an md5 on the file. I mean do you have an article or paper
that shows that it's a good compromise?
Michael
>
>
>
>
>>
>> Michael
>>
>> On Thu, Jun 1, 2023 at 3:30 PM Lee Winter <lee.j.i...@gmail.com> wrote:
>> >
>> > Your procedure does not change the file contents, but does change the file timestamp.
>> >
>> > -- Lee
>> > --
>> >
>> > On Thu, Jun 1, 2023 at 9:23 AM Michael Nazzareno Trimarchi <mic...@amarulasolutions.com> wrote:
>> >>
>> >> Hi all
>> >>
>> >> I have done a project but I notice that re-build is triggered even if
>> >> the file is not changed but just edit, restore to original and save.
>> >> It's that something that ninja should take in account in dep
>> >> calculation?
>> >>
>> >> Michael
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google Groups "ninja-build" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
>> >> To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/CAOf5uwmBQeZgfEvkOF8ewCP_tnHWFE30-H2UdS-j7K3mTFJzAQ%40mail.gmail.com.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "ninja-build" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/CAOf5uwk3Kc3iHwnqp5r1PmR8ioNEkjZ4NU6KOj5V34NFAiiuaA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/CAOf5uw%3DmcaqF5sNpd3B4jV4-gYU2w7X6y7rj%3DxBgK0KsrO37%2BQ%40mail.gmail.com.