On 3/29/15 4:24 AM, w0rp wrote:
I just added a module dependency graph generator by following a similar
process to the library which I used for class hierarchies. I'd be
willing to bet that Andrei wants to apply it to Phobos, and that is
indeed a thing that can be done.
There's an example on GitHub, and the readme explains how to run it. The
example outputs... this. (Try not to scream.)
https://i.imgur.com/Af4RKuc.png
So like you might expect for Phobos. Everything importing everything
else, just about. I have a few comments on this.
Not screaming, it's as expected :o). This tool will be of good help for
weeding some dependencies out.
One other informative graph that should be much easier to generate is
the direct imports graph (no transitivity).
I should add that removing dependencies for Phobos should be approached
with due consideration. It shouldn't be a goal in and of itself; users
don't care for it. It does have positive effects such as easier
debugging of the compiler that need to be appraised.
[snip
As an aside, ModuleInfo has been undocumented forever, as far as I can
tell. Would it be possible to get some documentation for ModuleInfo up
on the site? I've been figuring out how to use it just by reading
object_.d. If it was documented, someone else would have probably
written this stuff I'm writing by now already, because it's really
simple code.
We should, and maybe we can take this opportunity to define it well.
Once it's documented, it sets the stage for backward compatibility.
Andrei