[ 
https://issues.apache.org/jira/browse/DISPATCH-836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17343868#comment-17343868
 ] 

ASF GitHub Bot commented on DISPATCH-836:
-----------------------------------------

kgiusti commented on a change in pull request #1211:
URL: https://github.com/apache/qpid-dispatch/pull/1211#discussion_r631820969



##########
File path: src/CMakeLists.txt
##########
@@ -101,25 +111,28 @@ set(qpid_dispatch_SOURCES
   router_core/terminus.c
   router_core/transfer.c
   router_core/core_timer.c
+  router_core/module.c
   router_core/modules/edge_router/module.c
   router_core/modules/edge_router/addr_proxy.c
   router_core/modules/edge_router/connection_manager.c
   router_core/modules/edge_router/link_route_proxy.c
   router_core/modules/edge_router/edge_mgmt.c
   router_core/modules/test_hooks/core_test_hooks.c
   router_core/modules/edge_addr_tracking/edge_addr_tracking.c
-  router_core/modules/address_lookup_server/address_lookup_server.c
+  router_core/modules/address_lookup_server/address_lookup_utils.c

Review comment:
       My $0.02:
   
   The address lookup stuff is only used by router-core modules.  It's not used 
by I/O threads, for example.  This means that we should probably "hide" the 
functions that are in address_lookup_utils.c by moving that file into 
router_core/modules/address_lookup_server directory.
   
   Then I would move the address_lookup_server.h file out of the general 
include/qpid/dispatch directory and put it in src/router_core/ directory.
   
   These changes would result in moving the address lookup stuff into the 
router_core module, which seems better to me since the address lookup 
functionality is only to be used by the router_core.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> Source file organization suffers from include hell
> --------------------------------------------------
>
>                 Key: DISPATCH-836
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-836
>             Project: Qpid Dispatch
>          Issue Type: Improvement
>          Components: Container, Router Node, Routing Engine
>    Affects Versions: 0.8.0
>            Reporter: Charles E. Rolke
>            Assignee: Jiri Daněk
>            Priority: Minor
>             Fix For: 1.17.0
>
>
> Adding an innocent looking #include to some module may unleash a barrage of 
> errors instead of simply defining the header's interface. Reordering and/or 
> adding more #include statements is required to get it right.
> A good way to address this is to make certain that each module.h file 
> compiles cleanly on its own. It is tedious and pretty unrewarding to check 
> each file. One strategy to address this problem is for each module to 
> _#include module.h_ as the first include\[1\]. Then every compile checks that 
> the module.h files compiles cleanly. This strategy is recommended by 
> astitcher and used by qpid-cpp with great results.
> \[1\] One exception to this rule is including the #include Python.h ahead of 
> all others. This is a requirement.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to