Bug 2043 - record additional aggregations for print-introspected-doxygen
record additional aggregations for print-introspected-doxygen
Product: ns-3
Classification: Unclassified
Component: documentation
All All
: P5 normal
Assigned To: Peter Barnes
: 1561 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2015-01-22 13:36 EST by Peter Barnes
Modified: 2019-11-05 18:44 EST (History)
2 users (show)

See Also:

Reduce module dependency to just network. (6.93 KB, patch)
2015-01-24 01:53 EST, Peter Barnes
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Barnes 2015-01-22 13:36:52 EST
Users list discussion: 

Reported by Matt Anonyme:

./waf --doxygen-no-build and ./waf --doxygen but in both cases I have 
this kind of output (so I add the module, retry and another error pops 
up). So I guess documentation has to be generated with all moduels 
enabled right ? I saw no mention of it here: 
assert failed. cond="uid != 0", msg="Assert in TypeId::LookupByName: 
ns3::aodv::RoutingProtocol not found", 
file=../src/core/model/type-id.cc, line=560" 
Here is my .ns3rc 
modules_enabled = [↲ 
# Set this equal to true if you want examples to be run.↲ 
examples_enabled = False↲ 
# Set this equal to true if you want tests to be run.↲ 
tests_enabled = True↲
Comment 1 Peter Barnes 2015-01-22 13:37:18 EST
According to Tom:

It has to do with the build dependencies for 
print-introspected-doxygen.cc; the wscript allows it to build with only 
csma enabled, but runtime errors will occur if the module dependencies 
in GetTypicalAggregations() are not enabled. 

It can be reproduced by enabling only the set of modules that Matt 
posted earlier in this thread.
Comment 2 Peter Barnes 2015-01-24 01:53:24 EST
Created attachment 1952 [details]
Reduce module dependency to just network.

This patch checks if the requested aggregation object has been registered as a type.  If it hasn't (because the parent module wasn't enabled in the waf configuration), it records the aggregation object name separately.  These names then generate a config path message of:

"Introspection could not find Config paths for <x> in this build, likely because the parent module was not configured."

This patch makes possible two enhancements:

- print-introspected-doxygen (p-i-d) can depend only on network (which depends on core and stats).  The patch makes this change, replacing the CsmaChannel (from the csma module) with SimpleChannel (from network itself).

- We can add any further aggregations we want, without increasing the build dependencies on p-i-d.  (I haven't added any in this patch)

An implicit goal for our doxygen is to generate documentation for *everything* even if it is not part of the build (because it's not part of the configuration, or it's missing dependencies).  Of course, getting the dependencies right so p-i-d doesn't crash is part of meeting that goal.  The second point also facilitates that goal, by allowing a documentation build to pick up *all* config paths created by the configured modules, including obscure modules with external dependencies.

So, what *other* aggregations should we add to p-i-d?
Comment 3 Tom Henderson 2015-01-29 22:19:11 EST
pushed in changeset 11185:7d6c1139be2f

leaving open (needinfo) to respond to Peter's question about adding missing aggregations
Comment 4 Peter Barnes 2016-01-06 19:05:39 EST
*** Bug 1561 has been marked as a duplicate of this bug. ***
Comment 5 Peter Barnes 2019-11-05 18:44:27 EST
The process to record other aggregations is well documented in the GetTypicalAggregations() function of p-i-d:

Since no other aggregations have been mentioned here, suggest closing this bug.