View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003046||unreal||module api||public||2006-08-31 06:03||2015-04-25 13:46|
|Target Version||Fixed in Version||184.108.40.206|
|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*
|Tags||No tags attached.|
|3rd party modules|
|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.|
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........
||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).|
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)
all.h (1,591 bytes)
||(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...|
||Added to 3.3, r257|
I don't really think we should do this. I did this in Atheme, and honestly, I regret doing it.
So, I am closing this.
Done, added in 3.2.x and 3.4.x. Rather than "all.h" it's called "unrealircd.h".
Modules can now simply:
And they get what they need :)
If something is missing in unrealircd.h (could very well be) then it can be enhanced.
I didn't realize this issue was closed off by someone. Without stating any arguments by said person, as always.
It's just silly to require 3rd party coders to write down like 20-30 includes in a certain order. That's just.. oh I already said.. silly :D.
|2006-08-31 06:03||syzop||New Issue|
||Note Added: 0012304|
|2006-09-03 16:55||syzop||Note Added: 0012305|
|2006-09-03 16:56||syzop||Note Edited: 0012305|
|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|
||Status||new => acknowledged|
||View Status||private => public|
||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|
|2011-07-19 13:57||syzop||Assigned To||Stealth =>|
|2011-07-19 13:57||syzop||Status||resolved => needs re porting|
||Note Added: 0017524|
||Status||needs re porting => resolved|
||Fixed in Version||3.3-alpha0 => 3.4-alpha1|
||Resolution||fixed => won't fix|
||Assigned To||=> nenolod|
|2015-04-25 13:46||syzop||Note Added: 0018290|
|2015-04-25 13:46||syzop||Assigned To||nenolod =>|
|2015-04-25 13:46||syzop||Resolution||won't fix => fixed|
|2015-04-25 13:46||syzop||Fixed in Version||3.4-alpha1 => 220.127.116.11|
|2017-01-06 15:48||syzop||Category||module => module api|