2024-04-25 17:28 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000569mercuryBugpublic2023-12-06 12:51
Reporterwangp 
Assigned Towangp 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000569: timestamp regression with nested submodules in mmc --make
DescriptionHere is a problem with nested submodules attributed to commit 4d4ef3e3a "Cache timestamps by target file."

This sequence of commands:
```
#!/bin/sh
touch nested_module_test.m
mmc -m nested_module_test
sleep 1
echo --------
mmc -m nested_module_test
```

exhibits this incorrect behaviour:

Making Mercury/int3s/nested_module_test.int3
Making Mercury/int0s/nested_module_test.int0
Making Mercury/ints/nested_module_test.int
Making Mercury/cs/nested_module_test.c
Making Mercury/os/nested_module_test.o
Making nested_module_test
--------
Making Mercury/int3s/nested_module_test.int3
Making Mercury/os/nested_module_test.sub.o
Making nested_module_test

where nested_module_test.sub.o and nested_module_test are re-made by the second call to mmc --make, when they should already be up-to-date.


The previous (correct) behaviour is:

Making Mercury/int3s/nested_module_test.int3
Making Mercury/int0s/nested_module_test.int0
Making Mercury/ints/nested_module_test.int
Making Mercury/cs/nested_module_test.c
Making Mercury/os/nested_module_test.o
Making Mercury/os/nested_module_test.sub.o
Making nested_module_test
--------
Making Mercury/int3s/nested_module_test.int3
** Nothing to be done for `nested_module_test'.

[Actually, nested_module_test.int3 should not need to be remade either - that is a long-standing bug, but a minor one.]
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0001227

zs (developer)

It is possible that this is related to bug 568. Commit 764eab72a
touched make.timestamp.m in a way that removed the special treatment
of modules that are NOT the top modules of their source file.

I am testing a fix for 568 that reverses that commit, but also
fixes the old misleading documentation that led to it. That diff
may, or may not, also fix this bug. I have just posted it to m-rev.

~0001229

wangp (developer)

Fix committed 2023 dec 6.
+Notes

-Issue History
Date Modified Username Field Change
2023-12-04 12:26 wangp New Issue
2023-12-04 12:26 wangp Status new => assigned
2023-12-04 12:26 wangp Assigned To => wangp
2023-12-04 12:26 wangp File Added: nested_module_test.m
2023-12-05 12:58 zs Note Added: 0001227
2023-12-06 12:51 wangp Status assigned => resolved
2023-12-06 12:51 wangp Resolution open => fixed
2023-12-06 12:51 wangp Note Added: 0001229
+Issue History