Closed Bug 1510571 Opened 7 years ago Closed 7 years ago

remove some unneeded includes in mailnews/

Categories

(MailNews Core :: Backend, task, P5)

task

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 68.0

People

(Reporter: aceman, Assigned: aceman)

References

Details

(Whiteboard: only check in when nothing else can be checked in and you want to invoke a new build on trunk)

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1460049 +++ There are some includes in the /mailnews c++ files (.h, .cpp, .mm, .idl) that seem unneeded, the code does not use any identifier from the included file. I've made a quick script to identify where nsI* objects aren't used in the file, but nsI*.h file is included. Many of them are unneeded. Cleaning up the needless includes may speed up compiling by a tiny bit ;) I will attach several patches into this bug that cover the individual code directories under /mailnews. There is no priority to check them in after review. Jorg, you can use the patches for check-ins when needed, similar to bug 1399756.
Target Milestone: --- → Thunderbird 65.0
Comment on attachment 9029706 [details] [diff] [review] 1510571.patch nsMsgMessageFlags Looks OK. I don't quite understand the magic that removes some includes and adds others (in fact more than were removed), but I assume you've automated this.
Attachment #9029706 - Flags: review?(jorgk) → review+
It's that the includes are added to files that actually use the symbols, and removed from files that don't. Yes, in this case it is missing in more files. It would probably work without adding them, because it would still be included via some other header, but I don't want to rely on that. If you do something like https://searchfox.org/comm-central/search?q=nsMsgMessageFlags&case=false&regexp=false&path=.cpp it can be nicely seen which files use nsMsgMessageFlags but do not include the header.

Refreshed the patch.

Attachment #9029706 - Attachment is obsolete: true
Attachment #9061720 - Flags: review+
Type: enhancement → task
Keywords: checkin-needed
Target Milestone: Thunderbird 65.0 → Thunderbird 68.0

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/38fad21bebd4
clean up some includes of nsMsgMessageFlags.h and use of Ci.nsMsgMessageFlags. r=jorgk

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 7 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: