Subject: Redo targets built twice during single run

From: goredo <[email-masked]>
Date: Tue, 26 Oct 2021 09:21:35 +0000 (UTC)

Hi,

I had the feeling for some time that some targets get built a second time during a single run and now I've found an MWE. You need the following dependency graph:
- lvl1: lvl3 lvl2
  - lvl2: lvl3
    - lvl3

As you can see, lvl1 and lvl2 both depend on lvl3. The bug is triggered, when the arguments to redo-ifchange in lvl1 are as shown above, with lvl3 coming before lvl2. Then, redo misses to communicate that it has already built the dependency of lvl2 and lvl3 gets built a second time.

```
Level 3 executed
redo . lvl3 (0.003s)
Level 3 executed
redo . . lvl3 (0.003s)
redo . lvl2 (0.014s)
redo lvl1 (0.038s)
```

This only happens when redo is run with -j 1.

Kind regards,
–Michael