UnrealIRCd Bug Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003046 [unreal] module minor always 2006-08-31 06:03 2008-02-11 21:23
Reporter syzop View Status public  
Assigned To Stealth
Priority normal Resolution fixed  
Status resolved   Product Version 3.3-alpha0
Summary 0003046: [u33] Add #include "all.h"
Description Simple. Get rid of all 30 lines of #include lines (and corresponding #ifdef's) for each module, and make a simple "all.h" that includes all this shit, so that every module can simply use #include "all.h". Much more cleaner, and super-simple.

Something for u3.3*
Additional Information
Tags No tags attached.
3rd party modules
QA No need for QA
U4: Need for upstream patch No need for upstream InspIRCd patch
U4: Upstream notification of bug Not decided
U4: Contributor working on this None
Attached Files ? file icon all.h [^] (1,591 bytes) 2007-04-07 22:13

- Relationships
child of 0003049confirmed 3.3 Suggestions/Features 

-  Notes
(0012304)
codemastr (reporter)
2006-09-03 16:17

Doesn't it kinda defeat the purpose of include files though? Granted, our current way sucks. But isn't it more "include what you need"? If we don't need channel.h, we shouldn't be including it.
(0012305)
syzop (administrator)
2006-09-03 16:55
edited on: 2006-09-03 16:56

While the idea is technically nice, I don't think many people care about it including me. It only adds extra work to find out what's in where and add an include every time you use a certain function. Not to mention if we move a definition from file A to file B "to clean things up" or "improve". This is much easier and cleaner.

So, no, I think it's an excelent idea.

EDIT: Of course, if any 3rd party author wants to do it differently, that's their right, but they shouldn't complain when they have missed 1 of the 20 includes they need, or when they missed an ifdef, or when something got moved from modules.h to struct.h or vice versa, etc........

(0013349)
aquanight (reporter)
2007-04-06 21:36

I've attached an all.h I put together, basically just copied out the #include blob from message.c and then included some commented out #includes for all the other headers, since I'm not sure whether or not those needed to be included (some are only used in one or two .c files).
(0013351)
syzop (administrator)
2007-04-07 05:46

Many of the ones commented out are included by an include (common.h, struct.h, those two include quite some other includes). Perhaps you could narrow the list down with that info, only very few left then probably (basically just grep at the includename in include/*.h for each file).
One that can be ditched is include/threads.h, since we don't do threads anymore since 3.2beta14 or so. Could consider removing the file as well, but perhaps we shouldn't be ditching threading, perhaps it can be used for something we haven't thought of yet... (noidea, offtopic, just keep the file itself, but not references)
(0013354)
aquanight (reporter)
2007-04-08 01:10

(updated all.h attached) - was indeed a few that could be taken out, but a few are still left, but I'm not really sure if those are used in more than 1 or 2 places...
(0015107)
Stealth (administrator)
2008-02-11 21:23

Added to 3.3, r257

- Issue History
Date Modified Username Field Change
2006-08-31 06:03 syzop New Issue
2006-09-03 16:17 codemastr Note Added: 0012304
2006-09-03 16:55 syzop Note Added: 0012305
2006-09-03 16:56 syzop Note Edited: 0012305
2006-09-09 06:21 syzop Relationship added child of 0003049
2007-04-06 21:34 aquanight File Added: all.h
2007-04-06 21:36 aquanight Note Added: 0013349
2007-04-07 05:46 syzop Note Added: 0013351
2007-04-07 22:13 aquanight File Deleted: all.h
2007-04-07 22:13 aquanight File Added: all.h
2007-04-08 01:10 aquanight Note Added: 0013354
2007-04-18 05:41 stskeeps Status new => acknowledged
2007-04-19 03:10 stskeeps View Status private => public
2007-04-19 18:35 stskeeps Status acknowledged => confirmed
2008-02-11 21:22 Stealth Status confirmed => assigned
2008-02-11 21:22 Stealth Assigned To => Stealth
2008-02-11 21:23 Stealth QA => No need for QA
2008-02-11 21:23 Stealth U4: Need for upstream patch => No need for upstream InspIRCd patch
2008-02-11 21:23 Stealth Status assigned => resolved
2008-02-11 21:23 Stealth Fixed in Version => 3.3-alpha0
2008-02-11 21:23 Stealth Resolution open => fixed
2008-02-11 21:23 Stealth Note Added: 0015107


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker