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: Sun, 21 Feb 2021 11:38:59 +0300	[thread overview]
Message-ID: <YDIcI7N3hMmcHF3w@stargrave.org> (raw)
In-Reply-To: <8A9A850D-20DE-48CD-99D4-5FCCA3BE40B8@gmail.com>

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

Greetings!

*** Karolis K [2021-02-17 22:40]:
>In an ideal case I think only the file with a modified do script should be rebuilt, and then, since the output is the same, all other dependencies should simply pass.
>But maybe I am missing something?

You are right -- currently it is sub-optimal. The reason is simple: when
you determine if target is out-of-date (OOD), you recursively go through
the dependecies from "up to bottom" and if you see any OOD one, then the
whole path is considered OOD and rebuild starts. Simple algorithm.

I have encountered exactly that kind of problem with redo-always-ed
targets, which in my case are usually targets checking for environment
variables and configuration files changes. And nearly everyone depends
on them, because all build commands/options depends on envvars and
configuration. And that lead to rebuilding of nearly everything. But I
made a two-stage building and dependency tracking: track some of
"always" targets, rebuild them and then start an ordinary OOD detection
and targets rebuilding. And exactly here if rebuilt "always" targets are
not changed, then OOD works as we expect to skip building.

I must think about some kind of feedback channel that tells that target
is not changed after the rebuild. Will think about that and implement.
It will be useful optimization and safe (because of hashes there should
not be situations when something is skipped mistakenly).

-- 
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 --]

  reply	other threads:[~2021-02-21  8:39 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 [this message]
2021-02-27  9:09 ` Sergey Matveev
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