Add guidelines on how/where to include headers resp. forward declare things to the coding style
Categories
(Developer Infrastructure :: Source Code Analysis, task)
Tracking
(firefox94 fixed)
Tracking | Status | |
---|---|---|
firefox94 | --- | fixed |
People
(Reporter: sg, Assigned: andi)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
Currently, the coding style states on this topic:
Forward-declare classes in your header files, instead of including them, whenever possible. For example, if you have an interface with a void DoSomething(nsIContent* aContent) function, forward-declare with class nsIContent; instead of #include "nsIContent.h"
Given the current situation that Bug 1676346 tries to mitigate to some degree, these brief guidelines don't seem to be sufficient to keep include dependencies limited. More situations and possible mitigations should be described. Aspects that should be covered are e.g.
- interaction with the unified and non-unified builds
- IPDL files
When done, a heads-up should be given to dev-platform about this.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eb6cdd43ce2e Add some guidelines on include directives and header files to the coding style. r=andi,sylvestre,asuth
Comment 3•4 years ago
|
||
bugherder |
![]() |
||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 4•4 years ago
|
||
Backed out as requested: https://hg.mozilla.org/integration/autoland/rev/2caa43dff4ee6784048667ddb26d7f098684733d
Comment 5•4 years ago
|
||
beta backout: https://hg.mozilla.org/releases/mozilla-beta/rev/02897873b3a716a46950181f14d5741ef5ab568d
![]() |
||
Comment 6•4 years ago
|
||
Backout merged: https://hg.mozilla.org/mozilla-central/rev/2caa43dff4ee
Assignee | ||
Updated•3 years ago
|
Pushed by bpostelnicu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6f43446c07b7 Add some guidelines on include directives and header files to the coding style. r=asuth
Comment 8•3 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•