public inbox for goredo-devel@lists.cypherpunks.ru
Atom feed
From: Sergey Matveev <stargrave@stargrave•org>
To: goredo-devel@lists.cypherpunks.ru
Subject: Re: redoing unnecessary targets when a do file is modified but the output remains unchanged
Date: Sat, 27 Feb 2021 12:09:49 +0300	[thread overview]
Message-ID: <YDoMaCiTGDtB5lsu@stargrave.org> (raw)
In-Reply-To: <8A9A850D-20DE-48CD-99D4-5FCCA3BE40B8@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1566 bytes --]

Greetings!

I returned to that problem again and actually I do not see how it can be
solved fairly. For example Make has non-dynamic static dependency
information in its Makefiles and if A depends on B, then Make will:
    execute B, then execute A
But redo keeps dependencies information for OOD determination *only*. So
redo just:
    determines that A is OOD, because B is OOD, and then
    executes A.do,
        that *possibly* contains somewhever redo-ifchange B
    then it executes B.do, when redo-ifchange is called in A.do
"A" maybe OOD because of "B", but it does not mean that "B" it still the
dependency, that will be built anyway. Moreover, each .do explicitly
tells when to redo(-ifchange) targets -- and that can be at the very end
of some computations and preparations. redo-ifchange can be xargs-ed at
the very end of .do script/program. So, when we are build "B" and see
that it did not changed, we are *already* executing A.do, so we can not
"revert" that step backward, because without A.do execution we do not
know if B.do needs to be executed too.

Actually currently goredo already does unfair behaviour, explicitly
executing redo-always-ed targets first. Exactly just to prevent complete
rebuilding of everything because of honest redo-always-ed target. But I
just assume that in practice redo-always targets mostly used for some
kind of lightweight environment variable and configuration files checks.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2021-02-27  9:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 20:40 redoing unnecessary targets when a do file is modified but the output remains unchanged Karolis K
2021-02-21  8:38 ` Sergey Matveev
2021-02-27  9:09 ` Sergey Matveev [this message]
2021-05-04 22:52 Andrey Dobrovolsky
2021-05-05  7:35 ` Sergey Matveev
2021-05-05 13:52 Andrey Dobrovolsky
2021-05-05 15:11 ` Sergey Matveev
2021-05-05 18:35 Andrey Dobrovolsky