Graph rendering on dlang.org

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 1 14:12:14 PDT 2017


On 07/01/2017 03:56 AM, Patrick Schluter wrote:
> On Friday, 30 June 2017 at 21:52:10 UTC, Brian Schott wrote:
>> On Friday, 30 June 2017 at 21:40:05 UTC, Andrei Alexandrescu wrote:
>>> What would be a nice tool to render this DAG online? Who'd want to 
>>> work on inserting this? Ideally it would be some vector rendering.
>>
>> Graphviz's "dot" tool can output svg.
>>
>>
>> digraph "conversions" {
>>     "mutable" -> "const";
>>     "inout const" -> "const";
>>     "inout" -> "inout const";
>>     "immutable" -> "inout const";
>>     "immutable" -> "inout shared const";
>>     "inout shared" -> "inout shared const";
>>     "shared" -> "shared const";
>>     "inout shared const" -> "shared const";
>> }
>>
>> dot -Tsvg conversions.dot > conversions.svg
> 
> That's what doxygen uses to generate call graphs, callee graphs, include 
> hierarchies and other stuff. The dot language can also be embedded 
> directly in the comments. It would be nice if the D document generator 
> also used it.

That's a cool idea. (Do it!) At least at a point someone generated the 
global import graph for phobos. It would be great to have that available 
permanently so we know how to improve it. -- Andrei


More information about the Digitalmars-d mailing list