Andrey Semashev wrote:
Yes, although I don't really understand what a level means. It surely doesn't correspond to the number of dependencies, although there is some correlation. When deciding whether to use a library in my library I will be looking at its dependencies, not some level index.
If we assume that the purpose of the dependency report is to be informative (it's a report, after all), the problem is how to take the raw dependency information (which is basically what header includes what) and to distill it down to a form that will be most useful to humans. The module level is that information compressed into a single number. Modules on level N don't include anything from level N+1 and above. Obviously, a single (small) number can't hold enough information to describe the actual dependencies in full. It's merely a good proxy. It's something you quickly check to see if there's something amiss. Seeing boost::array at level 8 is enough to make one think. Of course, as with all proxies, if you make the level your sole focus the actual dependencies may suffer as a result, but suppose we are smart enough to not do that. :-) Doing secondary dependencies by module is also a way to compress the full dependency information into something more manageable, more understandable and more actionable, if you will. It answers the question "why does my module depend on Tokenizer" by giving you a module chain, instead of 172 (say) header chains.