On 1/4/25 7:50 PM, Robert Elz via gnats wrote:
If a so called "modern revision control system" can't put any form of (per file) revision info (indicating when, in some sense, that particular file was last updated) then we really shouldn't even consider using it.
Ignoring for a moment that it is actually moderately expensive to compute, the main problem is that there is no good way right now to feed that information back into the build process.
IMO the current RCSID is moderately useless for anything but very traditional C code. Changing a header won't change output binary whether or not it is a semantically relevant change.
The current functionality of __RCSID could be replaced by a "hash the file this resolves to" modifier in make. That's in fact still more useful than the current __RCSID as it can also be used to detect if there was a local change in the file, which the current system can't. That's in fact one of the reasons why the recorded IDs in pkgsrc are using that schema.
Joerg