On Sunday 15 June 2014 23:45:37 Julian Gonggrijp wrote:
I just caught up with this discussion, and based on what I read I think the future automated dependency handler should indeed operate on a per-header basis. This would mean that the configuration file of a module would list all headers in the module, and for each header in the module list all headers that it directly depends on. Of course still with support for conditional (e.g. tool-dependent) dependency annotations. *Optional* dependencies however could then be detected automatically, as I'll explain in my inline reply below.
Umm, I don't think that manually listing all headers and their dependencies in a config file is a viable idea. I have 235 headers in Log and who knows how many dependent headers. Even if that information is filled once, I can't realistically guarantee that the config file stays actual as I work on the library. The list of headers and their dependencies should be inferred by the tool from the headers themselves. Maintainers should be able to provide only the missing information - in particular, which headers are considered optional. Although, if the tool works on the header basis, the whole idea of optional headers becomes irrelevant - you don't include a header => you don't need its dependencies.